Skip to content

Commit

Permalink
feat: allow select when editable = false
Browse files Browse the repository at this point in the history
  • Loading branch information
SSShooter committed Jun 8, 2024
1 parent 0bad31c commit 4590adc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mind-elixir",
"version": "4.0.3",
"version": "4.0.4",
"type": "module",
"description": "Mind elixir is a free open source mind map core.",
"keywords": [
Expand Down
1 change: 0 additions & 1 deletion src/dev.dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const options: Options = {
return true
},
async addChild(el, obj) {
await sleep()
return true
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ MindElixir.DARK_THEME = DARK_THEME
* @memberof MindElixir
* @static
*/
MindElixir.version = '4.0.3'
MindElixir.version = '4.0.4'
/**
* @function
* @memberof MindElixir
Expand Down
4 changes: 2 additions & 2 deletions src/mouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export default function (mind: MindElixirInstance) {
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, false, e)
} else if (!mind.editable) {
return
} else if (target.tagName === 'text') {
if (target.dataset.type === 'custom-link') {
mind.selectArrow(target.parentElement as CustomSvg)
Expand Down

0 comments on commit 4590adc

Please sign in to comment.