Skip to content

Commit

Permalink
refactor: remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
SSShooter committed Oct 17, 2024
1 parent 33ab0ec commit abe32fa
Show file tree
Hide file tree
Showing 3 changed files with 3 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.1.5",
"version": "4.2.0",
"type": "module",
"description": "Mind elixir is a free open source mind map core.",
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const options: Options = {
// mouseSelectionButton: 2,
draggable: true,
editable: true,
contextMenu: false,
// if you set contextMenu to false, you should handle contextmenu event by yourself, e.g. preventDefault
contextMenu: true,
contextMenuOption: {
focus: true,
link: true,
Expand Down
3 changes: 0 additions & 3 deletions src/mouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,4 @@ export default function (mind: MindElixirInstance) {
if (e.button !== mouseMoveButton) return
dragMoveHelper.clear()
})
mind.map.addEventListener('contextmenu', e => {
e.preventDefault()
})
}

0 comments on commit abe32fa

Please sign in to comment.