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

Add interactive highlights for sim-specific draggable objects. #53

Closed
pixelzoom opened this issue Jan 17, 2024 · 6 comments
Closed

Add interactive highlights for sim-specific draggable objects. #53

pixelzoom opened this issue Jan 17, 2024 · 6 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

See interactive-highlights-quickstart-guide.md.

@pixelzoom
Copy link
Contributor Author

@arouinfar ready for review, close if OK.

@arouinfar
Copy link
Contributor

arouinfar commented Jan 17, 2024

Thanks @pixelzoom.

The electromagnet and pickup coil appear to have an extra interactive highlight when mousing over the back portion of the coils, but otherwise things are looking good on main. I do not see the extra highlight for keyboard focus, just interactive highlights with the mouse.
Screen Shot 2024-01-17 at 8 53 08 AM
Screen Shot 2024-01-17 at 8 53 33 AM

@arouinfar arouinfar assigned pixelzoom and unassigned arouinfar Jan 17, 2024
@arouinfar
Copy link
Contributor

Looks like the extra interactive highlight is indicative of bigger problems. I can move the back of the electromagnet coil with the mouse. I haven't been able to do the same for the pickup coil.
image

@pixelzoom
Copy link
Contributor Author

Looks like the extra interactive highlight is indicative of bigger problems. I can move the back of the electromagnet coil with the mouse. I haven't been able to do the same for the pickup coil.

Yes indeed, see #56.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jan 17, 2024

I tried this change in CoilNode:

    this.backgroundNode = new FELMovableNode( coil, {
      hasKeyboardDragListener: false,
+     interactiveHighlightEnabled: false

... but then there is no interactive highlight for CoilNode when the pointer is over backgroundNode.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jan 19, 2024

@arouinfar and I discussed. The foreground and background are separate Nodes, and must be separate Nodes if the B-field and magnets are to "pass through" the coil. Rather than try to make the foreground interactive highlight appear when over the background, we're going to live with 2 interactive highlights. (We will have one focus rectangle, which is very doable and already implemented.

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

No branches or pull requests

2 participants