My set size block is not working {SOLVED, ON HS ROADMAP}

Use this template to make awesome bug reports:

Your user name: Silver dolphin

What kind of device are you using?: IPhone 6s Plus

1 sentence description of the problem (I was doing _________, and then __________ happened):
I was trying to use the set width and height block, but nothing happened! When I used the set size block it grew…

I expected this to happen:
I expected it to become longer/taller
But instead this happened:
The block had no effect on the code
Here’s a sweet screenshot:
@tankt2016 made a bug test project:

tankt2016:

Here’s the bug recreation and its code—

Hopscotch

Bug recreation test by tankt2016

“Bug recreation test” by tankt2016. Made using the free Hopscotch app!

7 Likes

And I’m on an iPad 6th gen and it didn’t work for me either,

5 Likes

Perhaps your square measured the actual size in the set width/height block? I think it measures in pixels, instead of percentage.

2 Likes

I think you mean this:

  • Set Width Height does not work
  • This happens on projects with webplayer version 24 and below. You can use my Siri Shortcut to fix this if you don’t have any object-assigned variables
5 Likes

That’s probably because 150 is the default width/height for that object.

3 Likes

Maybe the ratio is bade off it

1 Like

Hi @Silverdolphin & @tankt2016

This project is doing what it should, except for the known issue that the Hopscotch shapes & characters include white space around them which throws off the Set Width/Height values

And fixing that is already on THT’s roadmap

Ok, so let me try to explain…

  • The square is originally about 68px by 68px
  • The Set Size 150% = (68 x 1.5)px
  • The actual size of the square image (including the white space) is 150 x 150px, so, until the update referenced above is implemented, the Width & Height values have to be ratio’d by 150/68 or about 2.2
  • So the 3rd square (to be the same as the 2nd with Set Size 150%) would need:
    Set Width (68 x 1.5 x 2.2) Height (68 x 1.5 x 2.2)

Conversely, when you have the 3rd square with ‘Set Width 150 Height 150’, that actually means to set the square to 150/2.2 or 68px. Which, if you recall what I said in the first bullet above, is the same as the original square height (or the 1st square in your test project). So it’s doing what’s currently expected.

You can check my explanation by temporarily adding a Set Text to the 2nd square after the Set Size 150%

And then you’ll see that the 3rd square would need a ‘Set Width 225 Height 225’ to be the same.

image


I’m going to recategorize this as Debug My Code since the issue isn’t a (new) bug.


I’d also recommend you remove the tag for Ana & Rodrigo

8 Likes

If you change it to 200 it changes because 150 ox is it’s default width and height. A rectangle would change its appearance though because all sides are not equal.

Okay thank you TB! I’ll remove the tags then!

3 Likes