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

Cloned line path appears 'over' original line path #19

Open
henrikr opened this issue Mar 20, 2019 · 0 comments
Open

Cloned line path appears 'over' original line path #19

henrikr opened this issue Mar 20, 2019 · 0 comments

Comments

@henrikr
Copy link

henrikr commented Mar 20, 2019

Problem
The original line path element naturally appears before the cloned element.

This causes problems for other plugins that perhaps have added event listeners (mouseover, mouseout, etc) to the original element as these events will not be triggered by the cloned element, for a couple of reasons:

  • cloneNode does not clone events of the original element, and
  • the cloned element appears 'over' the original element, effectively blocking triggering of events.

Solutions
One solution is to clone the events of the original node.

However, since the cloned node is purely presentational, perhaps it would be better to either disable mouse / pointer events of the cloned node or simply insert it first before the original node.

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

1 participant