File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,10 +86,8 @@ const methods = {
8686 if ( import . meta. env . MODE !== 'lite' ) {
8787 this . keypress && keypressInit ( this , this . keypress )
8888
89- if ( this . editable ) {
90- selection ( this )
91- this . disposable . push ( nodeDraggable ( this ) )
92- }
89+ selection ( this )
90+ this . disposable . push ( nodeDraggable ( this ) )
9391 if ( this . contextMenu ) {
9492 this . disposable . push ( contextMenu ( this , this . contextMenu ) )
9593 }
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ export default function (mind: MindElixirInstance) {
2020 let lastDistance : number | null = null
2121 const activePointers = new Map < number , { x : number ; y : number } > ( )
2222
23- // Node drag state - only initialize if draggable is enabled
24- const nodeDragState = mind . editable ? createNodeDragState ( mind ) : null
23+ // Node drag state - always initialize
24+ const nodeDragState = createNodeDragState ( mind )
2525
2626 // Long press state for touch devices
2727 let longPressTimer : number | null = null
@@ -190,7 +190,7 @@ export default function (mind: MindElixirInstance) {
190190 const mouseMoveButton = mind . mouseSelectionButton === 0 ? 2 : 0
191191
192192 // Handle node dragging with left button or touch (only for topics)
193- if ( nodeDragState && ( e . button === 0 || e . pointerType === 'touch' ) ) {
193+ if ( mind . editable && nodeDragState && ( e . button === 0 || e . pointerType === 'touch' ) ) {
194194 // For touch, only start drag with single finger
195195 if ( e . pointerType === 'touch' && activePointers . size > 1 ) {
196196 // Cancel any ongoing drag if second finger touches
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export default function (mei: MindElixirInstance) {
2525 } ,
2626 } )
2727 . on ( 'beforestart' , ( { event } ) => {
28+ if ( ! mei . editable ) return false
2829 if ( mei . spacePressed ) return false
2930 const target = event ! . target as HTMLElement
3031 if ( target . id === 'input-box' ) return false
You can’t perform that action at this time.
0 commit comments