chore(core): cleanup change handler
This commit is contained in:
@@ -25,7 +25,6 @@ export interface NodePositionChange {
|
|||||||
id: string
|
id: string
|
||||||
type: 'position'
|
type: 'position'
|
||||||
position: XYPosition
|
position: XYPosition
|
||||||
computedPosition: XYPosition
|
|
||||||
from: XYPosition
|
from: XYPosition
|
||||||
dragging: boolean
|
dragging: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,10 +98,6 @@ export const applyChanges = <
|
|||||||
if (isGraphNode(el)) {
|
if (isGraphNode(el)) {
|
||||||
if (typeof change.position !== 'undefined') el.position = change.position
|
if (typeof change.position !== 'undefined') el.position = change.position
|
||||||
|
|
||||||
if (typeof change.computedPosition !== 'undefined') {
|
|
||||||
el.computedPosition = { ...el.computedPosition, ...change.computedPosition }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (el.expandParent && el.parentNode) {
|
if (el.expandParent && el.parentNode) {
|
||||||
const parent = elements[elementIds.indexOf(el.parentNode)]
|
const parent = elements[elementIds.indexOf(el.parentNode)]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user