Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSHilightable sometimes not clearing when more than one have been applied to the same shape #73

Open
fuhrmanator opened this issue Aug 26, 2024 · 0 comments

Comments

@fuhrmanator
Copy link

When more than one RSHilightable apply to the same shape (I realize it may not make sense to do that), when the mouse is moved off of the item, the highlight is (sometimes) not removed.

Here's a minimal example that runs in a Playground:

canvas := RSCanvas new.
shapes := RSCircle models: { 1. 2. 1. 8. 9 }.
shapes
    size: 50;
    color: Color white.

shapes @ RSLabeled middle.

hl1 := RSHighlightable new.
hl1 highlightColor: Color red translucent.
hl1 highlightShapes: [ :mouseShape | 
    shapes select: [ :w | 
        w model <= mouseShape model ] ].
shapes @ hl1.

hl2 := RSHighlightable new.
hl2 highlightColor: Color orange translucent.
hl2 highlightShapes: [ :mouseShape | 
    shapes select: [ :w | 
        w model isDivisibleBy: mouseShape model ] ].
shapes @ hl2.

"first node should be at top (12 o'clock)"
RSCircleLayout new
    initialAngleInDegree: -90;
    on: shapes.

canvas addAll: shapes.

Here's a recording from Roassal in Pharo 13:
Pharo_A7uNH2qvAP

It seems to be non-deterministic (running this multiple times will give different results, but eventually the bug appears).

I'm sure this didn't happen in Roassal from Pharo 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@fuhrmanator and others