Answered

Widget top and bottom bounds attribute inverted?

  • 9 March 2021
  • 3 replies
  • 84 views

Userlevel 2
Badge +3

Hi, I was doing some widget plotting and detection earlier and found that widgets seem to have “reversed” values in their y-axis top and bottom bounds property. For example a fresh widget which I created with miro shape creator had these bounds:

This might just be a result of different plotting technique or something but from what I know bottom y axis point should always be smaller than the top y axis point. Is this “inverted” on purpose? If yes what is the idea behind this?

 

Also I have not made any tranformations / translations on the board or widgets. And what really bugged me is that the x-axis left and right points are plotted normally (left is on the left and right is on the right) unlike the y-axis points. From which arises another question is this actually plotted on the board in reverse or are the values just passed to the wrong attribute inside the widget data?

 

icon

Best answer by Max Harper 12 March 2021, 12:25

View original

3 replies

Userlevel 7
Badge +5

@Sami Ljimari   
Miro coordinates appear to follow html / SVG / Canvas standards. Which has Y inverted. 

And Yeah.. its always a mind-bender to do geometry in this system. :head_bandage:

http://drawingincode.com/lessons/concepts/coordinates/index.html

 

Userlevel 2
Badge +3

@Max Harper Thank you for the information. I didn’t know that SVG had inverted Y.

This probably is the reason why miro board has it inverted too as you said, although I wonder if there are any upsides to using it or if it is just a preference of the development team

 

Anyway I hope if someone else decides to manipulate widgets in a similar way and finds themselves confused about the plotting, they can see your answer to make it more clear and not waste hours on testing like me :grinning:

Userlevel 7
Badge +5

@Sami Ljimari

I imagine its just them following internet/screen convention, which makes sense … there’s lots of libraries and other layers of dependencies that will use that convention and to break from it would be scary.  

Glad this answer has you turned  … right side up.    :thinking:↩️:upside_down:

Reply