@@ -31,7 +31,7 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
3131 var margin = parseInt ( attrs . margin ) || 20 ;
3232 var height = parseInt ( attrs . height ) || $window . innerHeight ;
3333
34- var colorRange = [ d3 . rgb ( " #3366CC" ) , d3 . rgb ( '#EE2867' ) ] ;
34+ var colorRange = [ d3 . rgb ( ' #3366CC' ) , d3 . rgb ( '#EE2867' ) ] ;
3535
3636 var defaultRadius = 20 ;
3737
@@ -41,7 +41,7 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
4141 . append ( 'svg' )
4242 . style ( 'width' , '100%' ) ;
4343
44- var root = svg . append ( "g" ) ;
44+ var root = svg . append ( 'g' ) ;
4545
4646 var lastUpdate = null ;
4747
@@ -77,7 +77,7 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
7777 'prefixes' : Prefixes . getPrefixes ( ) ,
7878 'showTypes' : Filters . getIncludeLiterals ( ) ,
7979 'showLoops' : Filters . getIncludeLoops ( ) ,
80- " showDisjointNode" : Filters . getIncludeDisjointNode ( )
80+ ' showDisjointNode' : Filters . getIncludeDisjointNode ( )
8181 } ;
8282
8383 scope . $watch ( function ( ) {
@@ -87,7 +87,7 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
8787 } ) ;
8888
8989 scope . $watch ( 'data.nodes.size' , function ( ) {
90- $log . debug ( " [Graph] Number of nodes has changed!" ) ;
90+ $log . debug ( ' [Graph] Number of nodes has changed!' ) ;
9191 return scope . render ( scope . data ) ;
9292 } ) ;
9393
@@ -181,7 +181,7 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
181181
182182 scope . getMarkerEnd = function ( type , value ) {
183183 var size = parseInt ( Math . min ( Math . log2 ( value + 2 ) , 5 ) ) ;
184- return " url(#" + type + 'Arrow' + size + ")" ;
184+ return ' url(#' + type + 'Arrow' + size + ')' ;
185185 } ;
186186
187187 scope . calcRadius = function ( element ) {
@@ -279,33 +279,33 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
279279 * @param linkContainer
280280 */
281281 scope . createArrowHeads = function ( linkContainer ) {
282- linkContainer . append ( " defs" ) . selectAll ( " marker" )
282+ linkContainer . append ( ' defs' ) . selectAll ( ' marker' )
283283 . data ( scope . getArrowHeads ( ) )
284- . enter ( ) . append ( " marker" )
285- . attr ( "id" , function ( d ) {
284+ . enter ( ) . append ( ' marker' )
285+ . attr ( 'id' , function ( d ) {
286286 return d . id ;
287287 } )
288- . attr ( " class" , function ( d ) {
288+ . attr ( ' class' , function ( d ) {
289289 return d . class ;
290290 } )
291- . attr ( " viewBox" , function ( d ) {
292- return " -1 " + ( ( d . size + 1 ) * ( - 1 ) ) + " " + ( ( d . size + 1 ) * 2 ) + " " + ( ( d . size + 1 ) * 2 ) ;
291+ . attr ( ' viewBox' , function ( d ) {
292+ return ' -1 ' + ( ( d . size + 1 ) * ( - 1 ) ) + ' ' + ( ( d . size + 1 ) * 2 ) + ' ' + ( ( d . size + 1 ) * 2 ) ;
293293 } )
294- . attr ( " refX" , function ( d ) {
294+ . attr ( ' refX' , function ( d ) {
295295 return d . size * 2 ;
296296 } )
297- . attr ( " refY" , 0 )
298- . attr ( " markerWidth" , function ( d ) {
297+ . attr ( ' refY' , 0 )
298+ . attr ( ' markerWidth' , function ( d ) {
299299 return d . size ;
300300 } )
301- . attr ( " markerHeight" , function ( d ) {
301+ . attr ( ' markerHeight' , function ( d ) {
302302 return d . size ;
303303 } )
304- . attr ( " orient" , " auto" )
305- . style ( " stroke" , function ( d ) {
304+ . attr ( ' orient' , ' auto' )
305+ . style ( ' stroke' , function ( d ) {
306306 return ( d . class === 'hovered' ) ? 'red' : scope . arrowColor ( d . size ) ;
307307 } )
308- . style ( " fill" , function ( d ) {
308+ . style ( ' fill' , function ( d ) {
309309 if ( d . class === 'hovered' ) {
310310 return 'red' ;
311311 } else if ( d . class === 'subclass' ) {
@@ -314,9 +314,9 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
314314 return scope . arrowColor ( d . size ) ;
315315 }
316316 } )
317- . append ( " path" )
318- . attr ( "d" , function ( d ) {
319- return " M0," + ( d . size * - 1 ) + "L" + ( d . size * 2 ) + " ,0L0," + d . size + "Z" ;
317+ . append ( ' path' )
318+ . attr ( 'd' , function ( d ) {
319+ return ' M0,' + ( d . size * - 1 ) + 'L' + ( d . size * 2 ) + ' ,0L0,' + d . size + 'Z' ;
320320 } ) ;
321321 } ;
322322
@@ -349,18 +349,18 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
349349 scope . cardinalSpline = d3 . svg . line ( )
350350 . x ( function ( d ) { return ( d !== undefined ) ? d . x : 0 ; } )
351351 . y ( function ( d ) { return ( d !== undefined ) ? d . y : 0 ; } )
352- . interpolate ( " cardinal" ) ;
352+ . interpolate ( ' cardinal' ) ;
353353
354354 scope . loopSpline = d3 . svg . line ( )
355355 . x ( function ( d ) { return d . x ; } )
356356 . y ( function ( d ) { return d . y ; } )
357- . interpolate ( " cardinal" )
357+ . interpolate ( ' cardinal' )
358358 . tension ( 0 ) ;
359359
360360 scope . linearLine = d3 . svg . line ( )
361361 . x ( function ( d ) { return d . x ; } )
362362 . y ( function ( d ) { return d . y ; } )
363- . interpolate ( " linear" ) ;
363+ . interpolate ( ' linear' ) ;
364364
365365 // draw a ring for equivalent classes
366366 nodeContainer . selectAll ( '.equivalent' )
@@ -371,12 +371,12 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
371371 nodeContainer . selectAll ( '.class' )
372372 . append ( 'circle' )
373373 . classed ( 'clazz' , true )
374- . attr ( 'r' , function ( d ) { return d . radius + "px" ; } )
374+ . attr ( 'r' , function ( d ) { return d . radius + 'px' ; } )
375375 . on ( 'click' , scope . updateActive )
376376 . on ( 'mouseover' , function ( ) {
377377 d3 . select ( this ) . style ( 'fill' , 'red' ) ;
378378 } )
379- . on ( 'mouseout' , function ( d ) {
379+ . on ( 'mouseout' , function ( ) {
380380 d3 . select ( this ) . style ( 'fill' , '#acf' ) ;
381381 } )
382382 . append ( 'title' )
@@ -487,39 +487,39 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
487487
488488 scope . createArrowHeads ( linkContainer ) ;
489489
490- var links1 = scope . link = linkContainer . selectAll ( " g.link" )
490+ var links1 = scope . link = linkContainer . selectAll ( ' g.link' )
491491 . data ( bilinks ) ;
492492
493493 var linksG = links1 . enter ( )
494- . append ( "g" )
495- . attr ( " class" , " link" )
496- . style ( " stroke" , function ( d ) { return scope . lineColor ( d . value ) ; } ) ;
494+ . append ( 'g' )
495+ . attr ( ' class' , ' link' )
496+ . style ( ' stroke' , function ( d ) { return scope . lineColor ( d . value ) ; } ) ;
497497
498- scope . link = linksG . append ( " path" )
499- . attr ( " class" , " link-line" )
498+ scope . link = linksG . append ( ' path' )
499+ . attr ( ' class' , ' link-line' )
500500 . classed ( 'subClassProperty' , function ( d ) { return d . type === 'subClassProperty' ; } ) ;
501501
502502 links1 . exit ( ) . remove ( ) ;
503503
504504 linkContainer . selectAll ( '.link-line' )
505- . attr ( " marker-end" , function ( d ) { return scope . getMarkerEnd ( '' , d . value ) ; } )
506- . style ( " stroke-width" , function ( d ) {
505+ . attr ( ' marker-end' , function ( d ) { return scope . getMarkerEnd ( '' , d . value ) ; } )
506+ . style ( ' stroke-width' , function ( d ) {
507507 return Math . min ( Math . log2 ( d . value + 2 ) , 5 ) ;
508508 } )
509509 . on ( 'mouseover' , function ( ) {
510- d3 . select ( this ) . attr ( " stroke" , " red" ) ;
511- d3 . select ( this ) . attr ( " marker-end" , function ( d ) { return scope . getMarkerEnd ( 'hovered' , d . value ) ; } ) ;
510+ d3 . select ( this ) . attr ( ' stroke' , ' red' ) ;
511+ d3 . select ( this ) . attr ( ' marker-end' , function ( d ) { return scope . getMarkerEnd ( 'hovered' , d . value ) ; } ) ;
512512 } )
513- . on ( " mouseout" , function ( ) {
514- d3 . select ( this ) . attr ( " stroke" , function ( d ) { return scope . lineColor ( d . value ) ; } ) ;
515- d3 . select ( this ) . attr ( " marker-end" , function ( d ) { return scope . getMarkerEnd ( '' , d . value ) ; } ) ;
513+ . on ( ' mouseout' , function ( ) {
514+ d3 . select ( this ) . attr ( ' stroke' , function ( d ) { return scope . lineColor ( d . value ) ; } ) ;
515+ d3 . select ( this ) . attr ( ' marker-end' , function ( d ) { return scope . getMarkerEnd ( '' , d . value ) ; } ) ;
516516 } ) ;
517517
518518 linkContainer . selectAll ( '.subClassProperty' )
519- . attr ( " marker-end" , function ( d ) { return scope . getMarkerEnd ( 'subclass' , d . value ) ; } )
520- . on ( " mouseout" , function ( ) {
521- d3 . select ( this ) . attr ( " stroke" , function ( d ) { return scope . lineColor ( d . value ) ; } ) ;
522- d3 . select ( this ) . attr ( " marker-end" , function ( d ) { return scope . getMarkerEnd ( 'subclass' , d . value ) ; } ) ;
519+ . attr ( ' marker-end' , function ( d ) { return scope . getMarkerEnd ( 'subclass' , d . value ) ; } )
520+ . on ( ' mouseout' , function ( ) {
521+ d3 . select ( this ) . attr ( ' stroke' , function ( d ) { return scope . lineColor ( d . value ) ; } ) ;
522+ d3 . select ( this ) . attr ( ' marker-end' , function ( d ) { return scope . getMarkerEnd ( 'subclass' , d . value ) ; } ) ;
523523 } )
524524 . style ( 'stroke-dasharray' , '5, 5' ) ;
525525 } ;
@@ -530,14 +530,14 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
530530 scope . directLink = linkContainer . selectAll ( '.direct-link' )
531531 . data ( directLinks )
532532 . enter ( )
533- . append ( "g" )
533+ . append ( 'g' )
534534 . style ( 'stroke' , '#000' )
535- . append ( " path" )
535+ . append ( ' path' )
536536 . style ( 'stroke-width' , 1 )
537537 . classed ( 'disjointProperty' , function ( d ) { return d . type === 'disjointProperty' ; } ) ;
538538
539539 linkContainer . selectAll ( '.disjointProperty' )
540- . attr ( " marker-end" , 'none' )
540+ . attr ( ' marker-end' , 'none' )
541541 . style ( 'stroke-dasharray' , '5, 5' ) ;
542542 } ;
543543
@@ -628,7 +628,7 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
628628 var zoom = d3 . behavior . zoom ( )
629629 . duration ( 150 )
630630 . scaleExtent ( [ 0.1 , 2.0 ] )
631- . on ( " zoom" , scope . redraw ) ;
631+ . on ( ' zoom' , scope . redraw ) ;
632632 svg . call ( zoom ) ;
633633
634634 scope . maxValue = 0 ;
@@ -773,7 +773,7 @@ function NodeLinkGraph($window, $log, Properties, Nodes, Prefixes, Filters, Geom
773773 scope . force . on ( 'tick' , function ( ) {
774774 scope . link . attr ( 'd' , scope . recalculateLines ) ;
775775 scope . directLink . attr ( 'd' , scope . recalculateDirectLines ) ;
776- scope . node . attr ( " transform" , function ( d ) { return " translate(" + d . x + "," + d . y + ")" ; } ) ;
776+ scope . node . attr ( ' transform' , function ( d ) { return ' translate(' + d . x + ',' + d . y + ')' ; } ) ;
777777 } ) ;
778778 } ; // end of scope.render()
779779 } // end of link()
0 commit comments