You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mind.map.addEventListener('click', e => {
// if (dragMoveHelper.afterMoving) return
// e.preventDefault() // can cause <a /> tags don't work
const target = e.target as any
if (target.tagName === 'ME-EPD') {
mind.expandNode((target as Expander).previousSibling)
} else if (!mind.editable) {
return
} else if (isTopic(target)) {
mind.selectNode(target as Topic, false, e)
} ...
mind.map.addEventListener('dblclick', e => {
e.preventDefault()
if (!mind.editable) return
const target = e.target as HTMLElement
if (isTopic(target)) {
mind.beginEdit(target as Topic)
}
})
Preventing dblclick makes sense but preventing selection itself does not make sense I think. I have a teacher, student use case where students can't edit a node but should be able to select the node and use focus. I currently cannot do this because setting editable = false is making the mindmap readonly with no interactions. Focus or select or unselect are all passive operations and shouldn't be considered for mind.editable
Does anyone have a suggestion on how I can get selection to work without allowing dblclick?
The text was updated successfully, but these errors were encountered:
Yes. I'm proposing that this should be changed to prevent dblclick only and not prevent selection. Allowing select allows us to implement plugins but as it is implemented now, we implement anything since the node cannot be selected in editable=false condition. @SSShooter
From mouse.ts,
Preventing dblclick makes sense but preventing selection itself does not make sense I think. I have a teacher, student use case where students can't edit a node but should be able to select the node and use focus. I currently cannot do this because setting editable = false is making the mindmap readonly with no interactions. Focus or select or unselect are all passive operations and shouldn't be considered for mind.editable
Does anyone have a suggestion on how I can get selection to work without allowing dblclick?
The text was updated successfully, but these errors were encountered: