@@ -414,7 +414,7 @@ function snappingForce(sankeyNode, forceKey, nodes, d) {
414414
415415// scene graph
416416module . exports = function ( svg , styledData , layout , callbacks ) {
417- var sankey = svg . selectAll ( '.sankey' )
417+ var sankey = svg . selectAll ( '.' + c . cn . sankey )
418418 . data ( styledData
419419 . filter ( function ( d ) { return unwrap ( d ) . trace . visible ; } )
420420 . map ( sankeyModel . bind ( null , layout ) ) ,
@@ -425,7 +425,7 @@ module.exports = function(svg, styledData, layout, callbacks) {
425425
426426 sankey . enter ( )
427427 . append ( 'g' )
428- . classed ( ' sankey' , true )
428+ . classed ( c . cn . sankey , true )
429429 . style ( 'box-sizing' , 'content-box' )
430430 . style ( 'position' , 'absolute' )
431431 . style ( 'left' , 0 )
@@ -438,15 +438,15 @@ module.exports = function(svg, styledData, layout, callbacks) {
438438 . ease ( c . ease ) . duration ( c . duration )
439439 . attr ( 'transform' , sankeyTransform ) ;
440440
441- var sankeyLinks = sankey . selectAll ( '.sankeyLinks' )
441+ var sankeyLinks = sankey . selectAll ( '.' + c . cn . sankeyLinks )
442442 . data ( repeat , keyFun ) ;
443443
444444 sankeyLinks . enter ( )
445445 . append ( 'g' )
446- . classed ( ' sankeyLinks' , true )
446+ . classed ( c . cn . sankeyLinks , true )
447447 . style ( 'fill' , 'none' ) ;
448448
449- var sankeyLink = sankeyLinks . selectAll ( '.sankeyLink' )
449+ var sankeyLink = sankeyLinks . selectAll ( '.' + c . cn . sankeyLink )
450450 . data ( function ( d ) {
451451 var uniqueKeys = { } ;
452452 return d . sankey . links ( )
@@ -456,7 +456,7 @@ module.exports = function(svg, styledData, layout, callbacks) {
456456
457457 sankeyLink . enter ( )
458458 . append ( 'path' )
459- . classed ( ' sankeyLink' , true )
459+ . classed ( c . cn . sankeyLink , true )
460460 . attr ( 'd' , linkPath )
461461 . call ( attachPointerEvents , sankey , callbacks . linkEvents ) ;
462462
@@ -480,12 +480,12 @@ module.exports = function(svg, styledData, layout, callbacks) {
480480 . style ( 'opacity' , 0 )
481481 . remove ( ) ;
482482
483- var sankeyNodeSet = sankey . selectAll ( '.sankeyNodeSet' )
483+ var sankeyNodeSet = sankey . selectAll ( '.' + c . cn . sankeyNodeSet )
484484 . data ( repeat , keyFun ) ;
485485
486486 sankeyNodeSet . enter ( )
487487 . append ( 'g' )
488- . classed ( ' sankeyNodeSet' , true ) ;
488+ . classed ( c . cn . sankeyNodeSet , true ) ;
489489
490490 sankeyNodeSet
491491 . style ( 'cursor' , function ( d ) {
@@ -496,7 +496,7 @@ module.exports = function(svg, styledData, layout, callbacks) {
496496 }
497497 } ) ;
498498
499- var sankeyNode = sankeyNodeSet . selectAll ( '.sankeyNode' )
499+ var sankeyNode = sankeyNodeSet . selectAll ( '.' + c . cn . sankeyNode )
500500 . data ( function ( d ) {
501501 var nodes = d . sankey . nodes ( ) ;
502502 var uniqueKeys = { } ;
@@ -508,7 +508,7 @@ module.exports = function(svg, styledData, layout, callbacks) {
508508
509509 sankeyNode . enter ( )
510510 . append ( 'g' )
511- . classed ( ' sankeyNode' , true )
511+ . classed ( c . cn . sankeyNode , true )
512512 . call ( updateNodePositions )
513513 . call ( attachPointerEvents , sankey , callbacks . nodeEvents ) ;
514514
@@ -524,12 +524,12 @@ module.exports = function(svg, styledData, layout, callbacks) {
524524 . style ( 'opacity' , 0 )
525525 . remove ( ) ;
526526
527- var nodeRect = sankeyNode . selectAll ( '.nodeRect' )
527+ var nodeRect = sankeyNode . selectAll ( '.' + c . cn . nodeRect )
528528 . data ( repeat ) ;
529529
530530 nodeRect . enter ( )
531531 . append ( 'rect' )
532- . classed ( ' nodeRect' , true )
532+ . classed ( c . cn . nodeRect , true )
533533 . call ( sizeNode ) ;
534534
535535 nodeRect
@@ -543,12 +543,12 @@ module.exports = function(svg, styledData, layout, callbacks) {
543543 . ease ( c . ease ) . duration ( c . duration )
544544 . call ( sizeNode ) ;
545545
546- var nodeCapture = sankeyNode . selectAll ( '.nodeCapture' )
546+ var nodeCapture = sankeyNode . selectAll ( '.' + c . cn . nodeCapture )
547547 . data ( repeat ) ;
548548
549549 nodeCapture . enter ( )
550550 . append ( 'rect' )
551- . classed ( ' nodeCapture' , true )
551+ . classed ( c . cn . nodeCapture , true )
552552 . style ( 'fill-opacity' , 0 ) ;
553553
554554 nodeCapture
@@ -557,25 +557,25 @@ module.exports = function(svg, styledData, layout, callbacks) {
557557 . attr ( 'width' , function ( d ) { return d . zoneWidth ; } )
558558 . attr ( 'height' , function ( d ) { return d . zoneHeight ; } ) ;
559559
560- var nodeCentered = sankeyNode . selectAll ( '.nodeCentered' )
560+ var nodeCentered = sankeyNode . selectAll ( '.' + c . cn . nodeCentered )
561561 . data ( repeat ) ;
562562
563563 nodeCentered . enter ( )
564564 . append ( 'g' )
565- . classed ( ' nodeCentered' , true )
565+ . classed ( c . cn . nodeCentered , true )
566566 . attr ( 'transform' , nodeCentering ) ;
567567
568568 nodeCentered
569569 . transition ( )
570570 . ease ( c . ease ) . duration ( c . duration )
571571 . attr ( 'transform' , nodeCentering ) ;
572572
573- var nodeLabelGuide = nodeCentered . selectAll ( '.nodeLabelGuide' )
573+ var nodeLabelGuide = nodeCentered . selectAll ( '.' + c . cn . nodeLabelGuide )
574574 . data ( repeat ) ;
575575
576576 nodeLabelGuide . enter ( )
577577 . append ( 'path' )
578- . classed ( ' nodeLabelGuide' , true )
578+ . classed ( c . cn . nodeLabelGuide , true )
579579 . attr ( 'id' , function ( d ) { return d . uniqueNodeLabelPathId ; } )
580580 . attr ( 'd' , textGuidePath )
581581 . attr ( 'transform' , sankeyInverseTransform ) ;
@@ -586,12 +586,12 @@ module.exports = function(svg, styledData, layout, callbacks) {
586586 . attr ( 'd' , textGuidePath )
587587 . attr ( 'transform' , sankeyInverseTransform ) ;
588588
589- var nodeLabel = nodeCentered . selectAll ( '.nodeLabel' )
589+ var nodeLabel = nodeCentered . selectAll ( '.' + c . cn . nodeLabel )
590590 . data ( repeat ) ;
591591
592592 nodeLabel . enter ( )
593593 . append ( 'text' )
594- . classed ( ' nodeLabel' , true )
594+ . classed ( c . cn . nodeLabel , true )
595595 . attr ( 'transform' , textFlip )
596596 . style ( 'user-select' , 'none' )
597597 . style ( 'cursor' , 'default' )
@@ -608,12 +608,12 @@ module.exports = function(svg, styledData, layout, callbacks) {
608608 . ease ( c . ease ) . duration ( c . duration )
609609 . attr ( 'transform' , textFlip ) ;
610610
611- var nodeLabelTextPath = nodeLabel . selectAll ( '.nodeLabelTextPath' )
611+ var nodeLabelTextPath = nodeLabel . selectAll ( '.' + c . cn . nodeLabelTextPath )
612612 . data ( repeat ) ;
613613
614614 nodeLabelTextPath . enter ( )
615615 . append ( 'textPath' )
616- . classed ( ' nodeLabelTextPath' , true )
616+ . classed ( c . cn . nodeLabelTextPath , true )
617617 . attr ( 'alignment-baseline' , 'middle' )
618618 . attr ( 'xlink:href' , function ( d ) { return '#' + d . uniqueNodeLabelPathId ; } )
619619 . attr ( 'startOffset' , nodeTextOffset )
0 commit comments