@@ -60,7 +60,7 @@ export default class MindMap extends Component {
6060 /*
6161 * Add new class to nodes, attach drag behavior, and start simulation.
6262 */
63- prepareEditor ( svg , conns , nodes ) {
63+ prepareEditor ( svg , conns , nodes , subnodes ) {
6464 nodes
6565 . attr ( 'class' , 'mindmap-node mindmap-node--editable' )
6666 . on ( 'dblclick' , ( node ) => {
@@ -71,7 +71,7 @@ export default class MindMap extends Component {
7171 nodes . call ( d3Drag ( this . state . simulation , svg , nodes ) ) ;
7272
7373 this . state . simulation
74- . alphaTarget ( 0.5 ) . on ( 'tick' , ( ) => onTick ( conns , nodes ) ) ;
74+ . alphaTarget ( 0.5 ) . on ( 'tick' , ( ) => onTick ( conns , nodes , subnodes ) ) ;
7575 }
7676 /* eslint-enable no-param-reassign */
7777
@@ -99,7 +99,7 @@ export default class MindMap extends Component {
9999 . force ( 'link' ) . links ( this . props . connections ) ;
100100
101101 if ( this . props . editable ) {
102- this . prepareEditor ( svg , connections , nodes ) ;
102+ this . prepareEditor ( svg , connections , nodes , subnodes ) ;
103103 }
104104
105105 // Tick the simulation 100 times.
0 commit comments