fix(core): node dimensions update condition to only force when dimensions defined
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -38,7 +38,6 @@ onMounted(() => {
|
||||
return {
|
||||
id,
|
||||
nodeElement: entry.target as HTMLDivElement,
|
||||
forceUpdate: true,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -129,12 +129,11 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
|
||||
if (node) {
|
||||
const dimensions = getDimensions(update.nodeElement)
|
||||
|
||||
const doUpdate =
|
||||
!!(
|
||||
dimensions.width &&
|
||||
dimensions.height &&
|
||||
(node.dimensions.width !== dimensions.width || node.dimensions.height !== dimensions.height)
|
||||
) || update.forceUpdate
|
||||
const doUpdate = !!(
|
||||
dimensions.width &&
|
||||
dimensions.height &&
|
||||
(node.width !== dimensions.width || node.height !== dimensions.height || update.forceUpdate)
|
||||
)
|
||||
|
||||
if (doUpdate) {
|
||||
node.handleBounds.source = getHandleBounds('.source', update.nodeElement, zoom)
|
||||
|
||||
Reference in New Issue
Block a user