@ -1085,7 +1085,7 @@ class ManipulationSystem {
if ( this . options . addEdge . length === 2 ) {
if ( this . options . addEdge . length === 2 ) {
this . options . addEdge ( defaultData , ( finalizedData ) => {
this . options . addEdge ( defaultData , ( finalizedData ) => {
if ( finalizedData !== null && finalizedData !== undefined && this . inMode === 'addEdge' ) { // if for whatever reason the mode has changes (due to dataset change) disregard the callback
if ( finalizedData !== null && finalizedData !== undefined && this . inMode === 'addEdge' ) { // if for whatever reason the mode has changes (due to dataset change) disregard the callback
this . body . data . edges . add ( finalizedData ) ;
this . body . data . edges . getDataSet ( ) . add ( finalizedData ) ;
this . selectionHandler . unselectAll ( ) ;
this . selectionHandler . unselectAll ( ) ;
this . showManipulatorToolbar ( ) ;
this . showManipulatorToolbar ( ) ;
}
}
@ -1096,7 +1096,7 @@ class ManipulationSystem {
}
}
}
}
else {
else {
this . body . data . edges . add ( defaultData ) ;
this . body . data . edges . getDataSet ( ) . add ( defaultData ) ;
this . selectionHandler . unselectAll ( ) ;
this . selectionHandler . unselectAll ( ) ;
this . showManipulatorToolbar ( ) ;
this . showManipulatorToolbar ( ) ;
}
}
@ -1117,7 +1117,7 @@ class ManipulationSystem {
this . body . emitter . emit ( '_redraw' ) ;
this . body . emitter . emit ( '_redraw' ) ;
}
}
else {
else {
this . body . data . edges . update ( finalizedData ) ;
this . body . data . edges . getDataSet ( ) . update ( finalizedData ) ;
this . selectionHandler . unselectAll ( ) ;
this . selectionHandler . unselectAll ( ) ;
this . showManipulatorToolbar ( ) ;
this . showManipulatorToolbar ( ) ;
}
}
@ -1128,7 +1128,7 @@ class ManipulationSystem {
}
}
}
}
else {
else {
this . body . data . edges . update ( defaultData ) ;
this . body . data . edges . getDataSet ( ) . update ( defaultData ) ;
this . selectionHandler . unselectAll ( ) ;
this . selectionHandler . unselectAll ( ) ;
this . showManipulatorToolbar ( ) ;
this . showManipulatorToolbar ( ) ;
}
}