File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 93
93
.node-item-function text { fill : # dfdfdfdf ; }
94
94
.node-item-function : hover { cursor : pointer; }
95
95
.node-item-function : hover path { fill : # 666666 ; }
96
-
96
+
97
97
.node-item-type path { fill : # 303030 ; }
98
98
.node-item-type text { fill : # dfdfdf ; }
99
99
.node-item-type : hover { cursor : pointer; }
134
134
.node-item-type-quantization path { fill : rgb (80 , 40 , 0 , 0.7 ); }
135
135
.node-item-type-custom path { fill : rgb (64 , 64 , 64 , 0.7 ); }
136
136
}
137
+
138
+ /* render selected nodes */
139
+ .highlight path { stroke : # FF6347 ; stroke-width : 2px ;}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ sidebar.Sidebar = class {
9
9
this . _host = host ;
10
10
this . _id = id ? ( '-' + id ) : '' ;
11
11
this . _stack = [ ] ;
12
+ this . node_owner = null ;
12
13
this . _closeSidebarHandler = ( ) => {
13
14
this . _pop ( ) ;
14
15
} ;
@@ -64,6 +65,10 @@ sidebar.Sidebar = class {
64
65
container . style . width = '100%' ;
65
66
container . focus ( ) ;
66
67
}
68
+ if ( this . node_owner ) {
69
+ this . node_owner . element . classList . remove ( 'highlight' ) ;
70
+ this . node_owner = null ;
71
+ }
67
72
}
68
73
69
74
_deactivate ( ) {
@@ -121,6 +126,11 @@ sidebar.Sidebar = class {
121
126
container . style . width = 'max(40vw, calc(100vw - 500px))' ;
122
127
}
123
128
}
129
+
130
+ // used if the side bar is invoked to show a node's property
131
+ mark_node_owner ( node ) {
132
+ this . node_owner = node ;
133
+ }
124
134
} ;
125
135
126
136
sidebar . NodeSidebar = class {
Original file line number Diff line number Diff line change @@ -821,6 +821,10 @@ view.View = class {
821
821
nodeSidebar . toggleInput ( input . name ) ;
822
822
}
823
823
this . _sidebar . open ( nodeSidebar . render ( ) , 'Node Properties' ) ;
824
+
825
+ var node = this . modifier . name2ViewNode . get ( modelNodeName ) ;
826
+ node . element . classList . add ( 'highlight' ) ;
827
+ this . _sidebar . mark_node_owner ( node ) ;
824
828
}
825
829
catch ( error ) {
826
830
const content = " in '" + this . _model . identifier + "'." ;
You can’t perform that action at this time.
0 commit comments