@@ -587,31 +587,33 @@ window.Widgets.Graph = {};
587
587
// );
588
588
589
589
options . promotable_sim . on ( 'tick' , function ( ) {
590
+ // console.log(['promotable_sim ticked',this, options.promo_svg
591
+ // .selectAll('.plinks')]);
590
592
options . promo_svg
591
593
. selectAll ( '.plinks' )
592
- . attr ( 'x1' , ( d ) => d . source . x )
593
- . attr ( 'y1' , ( d ) => d . source . y )
594
- . attr ( 'x2' , ( d ) => d . target . x )
595
- . attr ( 'y2' , ( d ) => d . target . y ) ;
594
+ . attr ( 'x1' , ( d ) => d . source . vx )
595
+ . attr ( 'y1' , ( d ) => d . source . vy )
596
+ . attr ( 'x2' , ( d ) => d . target . vx )
597
+ . attr ( 'y2' , ( d ) => d . target . vy ) ;
596
598
597
599
options . promo_svg
598
600
. selectAll ( '.pnodes' )
599
- . attr ( 'x' , ( d ) => d . x - options . radius / 2 )
600
- . attr ( 'y' , ( d ) => d . y - options . radius / 2 ) ;
601
+ . attr ( 'x' , ( d ) => d . vx - options . radius / 2 )
602
+ . attr ( 'y' , ( d ) => d . vy - options . radius / 2 ) ;
601
603
602
604
options . promo_svg . selectAll ( '.pedgepath' ) . attr (
603
605
'd' ,
604
606
function ( d ) {
605
607
//console.log('pedgepath->', d);
606
608
return (
607
609
'M ' +
608
- d . source . x +
610
+ d . source . vx +
609
611
' ' +
610
- d . source . y +
612
+ d . source . vy +
611
613
' L ' +
612
- d . target . x +
614
+ d . target . vx +
613
615
' ' +
614
- d . target . y
616
+ d . target . vy
615
617
) ;
616
618
} ,
617
619
// (d) =>
@@ -648,13 +650,13 @@ window.Widgets.Graph = {};
648
650
console . log ( 'sedgepath->' , d ) ;
649
651
return (
650
652
'M ' +
651
- d . source . x +
653
+ d . source . vx +
652
654
' ' +
653
- d . source . y +
655
+ d . source . vy +
654
656
' L ' +
655
- d . target . x +
657
+ d . target . vx +
656
658
' ' +
657
- d . target . y
659
+ d . target . vy
658
660
) ;
659
661
} ,
660
662
// (d) =>
0 commit comments