Commit fe16249 1 parent 8fadf7e commit fe16249 Copy full SHA for fe16249
File tree 2 files changed +33
-1
lines changed
2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,30 @@ window.Widgets.Panel.Utils = {};
165
165
// },
166
166
// ];
167
167
168
+ // setup the left click capability
169
+ ns . selectArray = [ ] ;
170
+ ns . leftclick = function ( event , d ) {
171
+ let len = ns . selectArray . length ;
172
+ console . log ( `clicked on: ${ d } ` ) ;
173
+ const selected = d3 . select ( this ) ; // can't use arrow scoping
174
+ if ( event . ctrlKey ) {
175
+ // we will do a multi-select
176
+ if ( len < 2 ) {
177
+ // we add the data element to the array
178
+ ns . selectArray . push ( d ) ;
179
+ // highlight the node
180
+ selected . style ( "stroke" , ns . theme . select ) ;
181
+ selected . style ( "stroke-width" , 5 ) ;
182
+ } else if ( len === 2 ) {
183
+ // we first need to select the first object in the list
168
184
185
+ }
186
+
187
+ } else {
188
+ // we will do a single select
189
+ }
190
+
191
+ }
169
192
170
193
171
194
@@ -419,6 +442,15 @@ window.Widgets.Panel.Utils = {};
419
442
ns . split . promo_IDs = [ ] ;
420
443
ns . split . promo_annotate_list = [ ] ;
421
444
445
+ // Setup the local theme
446
+ if ( ! ns . theme ) {
447
+ if ( ns . options . theme === 'light' ) {
448
+ ns . theme = ns . options . light_theme
449
+ } else {
450
+ ns . theme = ns . options . dark_theme
451
+ }
452
+ }
453
+
422
454
// If Incident Management, then check for these promotoables
423
455
ns . split . prom_types = [
424
456
'incident' ,
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ window.Widgets.Panel.Promo = {}
131
131
// for promo
132
132
ns . promoNode = ns . promo_svg_root
133
133
. append ( 'g' )
134
- . selectAll ( 'pnodes' )
134
+ . selectAll ( '. pnodes' )
135
135
. data ( panelUtilsNs . split . promo . nodes )
136
136
. join ( 'image' )
137
137
. attr ( 'class' , 'pnodes' )
You can’t perform that action at this time.
0 commit comments