File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 773773 onnodecontextmenu ={handleNodeContextMenu }
774774 onedgecontextmenu ={handleEdgeContextMenu }
775775 onpanecontextmenu ={handlePaneContextMenu }
776+ nodeOrigin ={[0.5 , 0.5 ]}
776777 {...{ snapToGrid: true , snapGrid: SNAP _GRID } as any }
777778 deleteKeyCode ={[' Delete' , ' Backspace' ]}
778779 selectionKeyCode ={[' Shift' ]}
Original file line number Diff line number Diff line change 391391<style >
392392 .node {
393393 position : relative ;
394- /* Center node on its position point (node center = local origin) */
395- transform : translate (-50% , -50% );
396394 /* Dimensions set via inline style using grid constants */
395+ /* Note: center-origin handled by SvelteFlow's nodeOrigin={[0.5, 0.5]} */
397396 display : flex ;
398397 flex-direction : column ;
399398 background : var (--surface-raised );
417416
418417 .shape-diamond {
419418 border-radius : 4px ;
420- /* Compose with center transform */
421- transform : translate (-50% , -50% ) rotate (45deg );
419+ transform : rotate (45deg );
422420 }
423421
424422 .shape-diamond .node-content {
Original file line number Diff line number Diff line change 4545<style >
4646 .event-node {
4747 position : relative ;
48- /* Center event on its position point (center = local origin) */
49- transform : translate (-50% , -50% );
48+ /* Note: center-origin handled by SvelteFlow's nodeOrigin={[0.5, 0.5]} */
5049 cursor : pointer ;
5150 }
5251
You can’t perform that action at this time.
0 commit comments