Clicks are not detected outside of parents
Describe the bug If you create an object that has a negative coordinate, or a coordinate outside the parent, the onMouseClick event will not trigger. onMouseEnter and onMouseLeave still trigger however.
To Reproduce Steps to reproduce the behavior:
- Create a parent object
- Create a child of the parent object, with a location outside the parent object
- Give the parent object an onMouseClick event
Expected behavior The click event should trigger (as does the onMouseEnter and onMouseLeave)
This seems to be intended as click events are not propagated when the click is not within the components bounds. On the other hand, mouse movement related events aren't properly checked for bounding and always propagate. This sounds more like an issue with the mouse movement events rather than the clicked event.
Is there a particular use case for this that cannot be circumvented by designing the component hierarchy differently?
Is there a particular use case for this that cannot be circumvented by designing the component hierarchy differently?
I personally encountered it here, where each of the announcements is a child of the previous, with the x set at 110.percent. This allows for the next announcement to be at the end of the wrapped text, no matter the size of the text. I don't exactly see how this could be possible, without doing something like previousAnnouncement.getBottom().pixels, but then the pixels don't automatically rescale
Is there a particular use case for this that cannot be circumvented by designing the component hierarchy differently?
I personally encountered it here, where each of the announcements is a child of the previous, with the
xset at110.percent. This allows for the next announcement to be at the end of the wrapped text, no matter the size of the text. I don't exactly see how this could be possible, without doing something likepreviousAnnouncement.getBottom().pixels, but then the pixels don't automatically rescale
You should be able to create a container and then position each announcement using SiblingConstraint for Y.
Although that wouldn't use percents tho. Could a possible change be letting sibling constraint have a percent parameter (if there isn't already)?
Percents of what? You can always combine multiple constraints to achieve what you want.
Percent of width or percent of height. From my understanding, the pad in the SiblingConstraint is the same as say 5.pixels. Is there any way to get the pad to do 5.percent?
5 percent of what
The parent component's width/height, same as if you were to do x = 5.percent
I don't see why you couldn't? You'd basically just do SiblingConstraint() + 5.percent.
Oh right! Thank you!
