File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1- import { computed , signal } from "@preact/signals-core" ;
21import type { Signal } from "@preact/signals-core" ;
2+ import { computed , signal } from "@preact/signals-core" ;
33import cloneDeep from "lodash/cloneDeep" ;
44
55import { TAnchor } from "../../components/canvas/anchors" ;
@@ -143,10 +143,12 @@ export class BlockState<T extends TBlock = TBlock> {
143143 }
144144
145145 public updateBlock ( block : Partial < TBlock > ) : void {
146- this . $state . value = Object . assign ( { } , this . $ state. value , block ) ;
146+ // Update anchors first to ensure they have correct state when geometry changes
147147 if ( block . anchors ) {
148148 this . updateAnchors ( block . anchors ) ;
149149 }
150+
151+ this . $state . value = Object . assign ( { } , this . $state . value , block ) ;
150152 this . getViewComponent ( ) ?. updateHitBox ( this . $geometry . value , true ) ;
151153 }
152154
You can’t perform that action at this time.
0 commit comments