Unable to set line height correctly

I’m trying to set the top and height of a line using the Inspector, but Hype sometimes chooses its own value to replace the height I just entered. For instance, starting with the file attached, if I enter the values shown in the left figure below, what what Hype has actually set is shown in the right figure (seen if I click off of the object and then back onto it to see the current actual value).
SetLineSize

I get the same behavior whether the line is a vector object or pencil object. Both are in the file.

I have both “Constrain proportions” and “Constrain ratio” unchecked. Is there something else I should change to remove a constraint I’m not seeing? :thinking:

Many thanks in advance for any insights!
ChangeLineSize.hype.zip (11.3 KB)

1 Like

This is a bug - thanks for writing to report it!

Vector Shapes in Hype are <svg> elements within a <div>, so there’s a lot of care that needs to be made on how to size the containing components, including giving adequate padding around the element to deal with line thickness. In this case, we missed removing one side of this padding in doing the scale factor multiplication. For larger vector shapes with thin borders it likely won’t be noticeable but when trying to resize a small element like yours it makes a much bigger difference.

I have a proposed fix that should be in the next Hype release (but need to do more testing to make sure it is okay since resizing is a pretty critical piece of code).

Thanks!

2 Likes

Cool, @jonathan – thanks for investigating! And understood about the “lot of care that needs to be made on how to size the containing components,” which I can’t even begin to imagine. Thanks very much for taking care of all of those details for us! :trophy: Such bugs are inevitable I know, and I appreciate your releasing the fix only after it’s appropriately vetted.

Thanks you!!

2 Likes

Please let me know if you hit anything else!

1 Like