There's an error in the documentation for bounds/1, the docs say the format is {left, right, top, bottom}, but that's not correct, it's actually {left, top, right, bottom}
It's a tiny error but pretty misleading for anyone trying to use this function, hahaha!
Just to prove this completely, I made a test app & created this graph:
Description
There's an error in the documentation for bounds/1, the docs say the format is
{left, right, top, bottom}
, but that's not correct, it's actually{left, top, right, bottom}
It's a tiny error but pretty misleading for anyone trying to use this function, hahaha!
Just to prove this completely, I made a test app & created this graph:
which renders like this:
In the handle_event/3 I checked the bounds:
I see:
Bounds: {25.0, 75.0, 125.0, 275.0}
Also the typespec in Scenic.Graph shows the order
left, top, right, bottom
so I'm pretty certain now it was just a documentation error https://github.com/boydm/scenic/blob/master/lib/scenic/graph.ex#L175Motivation and Context
When using bounds/1 I was getting some very strange behaviour due to how it was documented vs how it works.
Types of changes