-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Apply and ensure stroke event only to activate editable shapes #4810
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
Conversation
…e editable shapes
src/components/shapes/draw.js
Outdated
@@ -163,15 +168,11 @@ function drawOne(gd, index) { | |||
} else { | |||
if(gd._context.edits.shapePosition) { | |||
setupDragElement(gd, path, options, index, shapeLayer, editHelpers); | |||
} else { | |||
if(options.editable === true) { | |||
path.style('pointer-events', 'stroke'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as this is scoped to options.editable === true
, can't we still allow clicking on the fill when it's mostly opaque? >0.5
seems a fine cutoff to me. I feel like that's the behavior people will expect - most importantly when there's no stroke but even when there is as long as there's a strong fill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revised in 078c007.
} | ||
} | ||
] | ||
}, onfig: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, onfig: { | |
}, config: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo of the week
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! Just one little typo to fix and this should be ready! 💃
@archmoj re:
do we need to change one of the schema attribute descriptions to match this? I can't remember. |
@nicolaskruchten |
Fixes #4806 and fixes #4808
also now one could strat drawing over shapes no matter what the opacity of the below shape is.Codepen after: https://codepen.io/MojtabaSamimi/pen/WNQdQZv
@plotly/plotly_js
@emmanuelle