Your username:
RoadOcean What kind of device are you using?: (Also include iOS version, and Hopscotch version)
3.50.5 14.8 1 sentence description of the problem (I was doing _________, and then __________ happened): I was test grow and shrink and when I put them together. The object disappears
Steps that the Hopscotch team can take to reproduce my problem every time:
grow by percent + shrink by percent do not work the same as set size percent
if you have an object at size 100 and grow it by 100 percent, it will set size to:
100 * (1 + 1.00) = 200
but if you try to shrink by 100 after that, then this will happen:
200 * (0 + 0) = 0
in other words, those blocks grow/shrink based on the current size while set size is set off a fixed original size
this is not replying to your case (which i can tell you rn that is not a bug, read nobody’s post for more information), but just sharing a short documentation by @t1_hopscotch about how shrink and grow works in hopscotch:
Since grow by and shrink by use percentage value, shrinking by 100% will make the object shrink to 0% size, no matter the size before.
If you want to shrink it back to original size, use set size % to 100.
Or shrink by 50% to shrink it to half the size.
When using the formula, 200% - (100% * 200%) = 200% - 200% = 0%
200% - (50% * 200%) = 200% - 100% = 100%
So (current size%) - (x * (current size%)) = new size%
Just Realized my math error…
100 (\frac{\text{current size%} - \text{new size%}}{\text{current size%}}) = x This is how to figure out how much to shrink by to get the that new size from a set current size.
For grow by, it’s just (new size - current size)
(125 - 100) = 25
I knew all that time in Algebra would pay off. I just did the “Do Undo” method to find x in the original formula done by t1_hopscotch. I had to move some things around, but I got through it…
x = the value placed in the parameter of the shrink by block.
I also found out shrink by -100 acts like grow by 100 very recently.
Yeah – in fact, this behavior was why the set size block was added in the first place. (HS wanted a better way to set a specific size rather than relative adjustments).
Grow and shrink by design are relative to the current size, and the in-app description says it too I think