File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
application-interactive-link-visualizer-webjar/src/main/resources/src Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -426,13 +426,22 @@ renderer.getMouseCaptor().on("mouseup", (event) => {
426
426
}
427
427
} ) ;
428
428
429
- // On click, we open the corresponding page URL
430
- renderer . on ( "clickNode" , ( { node } ) => {
431
- if ( ! graph . getNodeAttribute ( node , "hidden" ) && allowClick ) {
432
- window . open ( graph . getNodeAttribute ( node , "pageURL" ) , "_self" ) ;
433
- }
434
- } ) ;
429
+ /* On click, we open the corresponding page URL:
430
+ In panel the links will be opened in the current tab, elsewhere in the new tab
431
+ */
432
+ if ( isPanel ) {
433
+ renderer . on ( "clickNode" , ( { node } ) => {
434
+ if ( ! graph . getNodeAttribute ( node , "hidden" ) && allowClick ) {
435
+ window . open ( graph . getNodeAttribute ( node , "pageURL" ) , "_self" ) ;
436
+ }
437
+ } ) ;
438
+ }
435
439
if ( ! isPanel ) {
440
+ renderer . on ( "clickNode" , ( { node } ) => {
441
+ if ( ! graph . getNodeAttribute ( node , "hidden" ) && allowClick ) {
442
+ window . open ( graph . getNodeAttribute ( node , "pageURL" ) , "_blank" ) ;
443
+ }
444
+ } ) ;
436
445
const camera = renderer . getCamera ( ) ;
437
446
zoomInBtn . addEventListener ( "click" , ( ) => {
438
447
camera . animatedZoom ( { duration : 600 } ) ;
You can’t perform that action at this time.
0 commit comments