List "noScale"

It seems that the parameter "noScale" of List doesn't work like it used to be

Thanks @marvafink - and welcome!! We will look into it this afternoon. Feel free to give yourself a profile pic and introduce yourself at https://forum.zimjs.com/t/introductions-please-tell-us-something-about-you/

Hi @marvafink - we are finding that the noScale is turned on for custom objects and we viewNum does not make a difference - we can't make viewNum work with custom objects. We checked back to ZIM CAT 00 and it is the same there too. Can you post some screenshots of what you are expecting?

The noScale was never intended to affect the normal List with default labels.

here an example:

const list = new List({
    list: [
        new Rectangle({ width: 100, color: red }),
        new Rectangle({ width: 100, color: orange }),
        new Rectangle({ width: 100, color: yellow }),
        new Rectangle({ width: 100, color: green }),
        new Rectangle({ width: 100, color: blue }),
        new Rectangle({ width: 100, color: pink }),
    ],
    width: 450,
    vertical: false,
    noScale: true,
    spacing: 20
}).center();

on zim14 the rectangles keep their original size, on zim16 they get smaller

Okay - yes... we see it now. It looks like changes were made in ZIM 015 for the continuous scrolling of a list - so blame @amihanya ;-). Just off to teach and will have a look later this afternoon.

:sweat_smile: ....

1 Like

Okay - looking into it more...

I will describe things assuming a horizontal List like you have the code for above (the vertical is similar but with direction of things switched). You do not really need to know all this, just keeping track of findings here.

There is a difference between 014 and 015 being that we included padding in the 015 which gives a correct size for the horizontal Tabs that the List is made from.

Adding the padding messes up the continuous calculation for vertical (horizontal seems fine). We should not just remove it as we did in 015 (and 016) but rather there must be another way to adjust so continuous still works. Also... we found that horizontal continuous only shows two sets of list elements and does not properly swap to make a continuous effect. So we will fix this and the padding issue hopefully later today or tomorrow. It is tricky code, and does not seem quite right, so we will have to really dig into it and it is nap time.

hahaha - found out why it is not continuous on horizontal!

Hi @marvafink - this has been switched back to how it was in 014 with the fix for the continuous being that we were using the original list length rather than the doubled list length and it works fine now. We also added the equation for the horizontal continuous! Woot. Cheers. Do a refresh and let us know if there are any more issues. We have put a note in the docs about viewNum not affecting vertical custom objects in the list but it does affect the horizontal custom objects unless noScale is set. This is how tabs work.

thanks!! works perfectly

1 Like