Remove accidental onMouseDown handler (#5405)

* Remove accidental onMouseDown handler

* Fix test snapshot

* Add test that onMouseDown isn't overwritten
This commit is contained in:
AustinMroz
2025-09-06 20:22:59 -07:00
committed by GitHub
parent c2eb4f03e9
commit db37693688
3 changed files with 5 additions and 32 deletions

View File

@@ -621,5 +621,10 @@ describe('LGraphNode', () => {
expect(node.getInputSlotPos(inputSlot)).toEqual([expectedX, expectedY])
delete (node.constructor as any).slot_start_y
})
test('should not overwrite onMouseDown prototype', () => {
expect(Object.prototype.hasOwnProperty.call(node, 'onMouseDown')).toEqual(
false
)
})
})
})

View File

@@ -84,7 +84,6 @@ LGraph {
"lostFocusAt": undefined,
"mode": 0,
"mouseOver": undefined,
"onMouseDown": [Function],
"order": 0,
"outputs": [],
"progress": undefined,
@@ -157,7 +156,6 @@ LGraph {
"lostFocusAt": undefined,
"mode": 0,
"mouseOver": undefined,
"onMouseDown": [Function],
"order": 0,
"outputs": [],
"progress": undefined,
@@ -231,7 +229,6 @@ LGraph {
"lostFocusAt": undefined,
"mode": 0,
"mouseOver": undefined,
"onMouseDown": [Function],
"order": 0,
"outputs": [],
"progress": undefined,