@@ -58,7 +58,9 @@ app.registerExtension({
5858 } ;
5959
6060 // Draw a preview of where the node will go if holding shift and the node is selected
61+ // @ts -ignore
6162 const origDrawNode = LGraphCanvas . prototype . drawNode ;
63+ // @ts -ignore
6264 LGraphCanvas . prototype . drawNode = function ( node , ctx ) {
6365 if ( app . shiftDown && this . node_dragged && node . id in this . selected_nodes ) {
6466 const [ x , y ] = roundVectorToGrid ( [ ...node . pos ] ) ;
@@ -88,8 +90,6 @@ app.registerExtension({
8890 return origDrawNode . apply ( this , arguments ) ;
8991 } ;
9092
91-
92-
9393 /**
9494 * The currently moving, selected group only. Set after the `selected_group` has actually started
9595 * moving.
@@ -100,7 +100,9 @@ app.registerExtension({
100100 * Handles moving a group; tracking when a group has been moved (to show the ghost in `drawGroups`
101101 * below) as well as handle the last move call from LiteGraph's `processMouseUp`.
102102 */
103+ // @ts -ignore
103104 const groupMove = LGraphGroup . prototype . move ;
105+ // @ts -ignore
104106 LGraphGroup . prototype . move = function ( deltax , deltay , ignore_nodes ) {
105107 const v = groupMove . apply ( this , arguments ) ;
106108 // When we've started moving, set `selectedAndMovingGroup` as LiteGraph sets `selected_group`
@@ -120,6 +122,7 @@ app.registerExtension({
120122 for ( const node of this . _nodes ) {
121123 node . alignToGrid ( ) ;
122124 }
125+ // @ts -ignore
123126 LGraphNode . prototype . alignToGrid . apply ( this ) ;
124127 }
125128 return v ;
@@ -130,7 +133,9 @@ app.registerExtension({
130133 * drawing a ghost box when one is actively being moved. This mimics the node snapping behavior for
131134 * both.
132135 */
136+ // @ts -ignore
133137 const drawGroups = LGraphCanvas . prototype . drawGroups ;
138+ // @ts -ignore
134139 LGraphCanvas . prototype . drawGroups = function ( canvas , ctx ) {
135140 if ( this . selected_group && app . shiftDown ) {
136141 if ( this . selected_group_resizing ) {
@@ -155,13 +160,18 @@ app.registerExtension({
155160
156161
157162 /** Handles adding a group in a snapping-enabled state. */
163+ // @ts -ignore
158164 const onGroupAdd = LGraphCanvas . onGroupAdd ;
165+ // @ts -ignore
159166 LGraphCanvas . onGroupAdd = function ( ) {
160167 const v = onGroupAdd . apply ( app . canvas , arguments ) ;
161168 if ( app . shiftDown ) {
169+ // @ts -ignore
162170 const lastGroup = app . graph . _groups [ app . graph . _groups . length - 1 ] ;
163171 if ( lastGroup ) {
172+ // @ts -ignore
164173 roundVectorToGrid ( lastGroup . pos ) ;
174+ // @ts -ignore
165175 roundVectorToGrid ( lastGroup . size ) ;
166176 }
167177 }
0 commit comments