11import { Connection , Editor , NodeInterface , NodeOption , Node } from "@baklavajs/core" ;
22import { Input , Link , Nodetree } from "@/api/nodeSchema" ;
33import { ViewPlugin } from "@baklavajs/plugin-renderer-vue" ;
4- // eslint-disable-next-line import/no-unresolved, import/extensions
54import { IViewNode } from "@baklavajs/plugin-options-vue/dist/baklavajs-plugin-renderer-vue/types" ;
65
76function linkFromNodeInterface ( intf : NodeInterface ) : Link {
@@ -80,9 +79,7 @@ export function saveNodetree(editor: Editor, view: ViewPlugin): Nodetree {
8079}
8180
8281export function loadNodeTree ( editor : Editor , view : ViewPlugin , nodetree : Nodetree ) {
83- // eslint-disable-next-line no-param-reassign
8482 view . panning = nodetree . extras . panning ?? view . panning ;
85- // eslint-disable-next-line no-param-reassign
8683 view . scaling = nodetree . extras . scaling ?? view . scaling ;
8784
8885 for ( let i = editor . connections . length - 1 ; i >= 0 ; i -- ) {
@@ -111,13 +108,11 @@ export function loadNodeTree(editor: Editor, view: ViewPlugin, nodetree: Nodetre
111108 nodeMap . set ( node . id , node ) ;
112109
113110 for ( const [ name , value ] of Object . entries ( n . settings ) ) {
114- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
115111 node . options . get ( name ) ! . value = value ;
116112 }
117113
118114 for ( const [ name , value ] of Object . entries ( n . inputs ) ) {
119115 if ( value . value ) {
120- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
121116 node . interfaces . get ( `in-${ name } ` ) ! . value = value . value ;
122117 } else if ( value . link ) {
123118 const arr = linkMap . get ( node ) ?? [ ] ;
@@ -137,7 +132,6 @@ export function loadNodeTree(editor: Editor, view: ViewPlugin, nodetree: Nodetre
137132 for ( const [ node , linkArr ] of linkMap ) {
138133 for ( const { fromName, fromId, toName } of linkArr ) {
139134 const toInterface = node . getInterface ( toName ) ;
140- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
141135 const fromInterface = nodeMap . get ( fromId ) ! . getInterface ( fromName ) ;
142136
143137 editor . addConnection ( fromInterface , toInterface ) ;
0 commit comments