Skip to content

Conversation

@alexcjohnson
Copy link
Collaborator

fixes #2265

In #2241 we consolidated click behavior into the drag handler, for cartesian subplots. But this inadvertently disabled click when the drag handler was not attached - ie when there's nothing to drag because you're in zoom or pan mode and all the axes are fixedrange!

@dfcreative please take a look!

@alexcjohnson
Copy link
Collaborator Author

@dfcreative 5th time's a charm 🙃 Lets get #2278 or some squashed version merged ASAP and 🙏 our tests get more reliable!

if(allFixedRanges && !isMainDrag) {
dragger.onmousedown = null;
dragger.style.pointerEvents = isMainDrag ? 'all' : 'none';
dragger.style.pointerEvents = 'none';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is called just once per dragger element, right? Ie. it does not need to be reset to pointerEvents 'all'.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thinking - I had to check, but yes, if you change it later so this needs pointerEvents, it will be reinstated by dragElement.init

@dy
Copy link
Contributor

dy commented Jan 23, 2018

@alexcjohnson looks good, although not sure I can review the whole logic.
Tests are merged, should pass fine now.

@alexcjohnson alexcjohnson merged commit defb8aa into master Jan 23, 2018
@alexcjohnson alexcjohnson deleted the fixedrange-click branch January 23, 2018 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug something broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plotly_click doesn't fire when fixedrange is true

2 participants