Vue/graf/src/middleware/GrafModel.js
// Wrapper to check if the selection is valid for expansion, calls corresponding helper if it is
Wrapper to check if the selection is valid for expansion, calls corresponding helper if it is
Wrapper to check if the selection is valid for expansion calls corresponding helper if it is
expand() {
		if (this.selection
			&& this.selection.getSelectionAmount() == 1
			&& this.selection.getSelectionType() == "Node") {
			let id = this.selection.getSelectedNodeIds()[0];
			this.expandNode(id);
			this.selection = null;
		}
		else if (this.selection
			&& this.selection.getSelectionAmount() == 1
			&& this.selection.getSelectionType() == "Edge") {
			let id = this.selection.getSelectedEdgeIds()[0];
			this.expandEdge(id);
			this.selection = null;
		}
		else {
			console.log("WARNING: attempted to expand given an invalid selection, attempt ignored");
		}
	}
expand ( ) { if ( this . selection && this . selection . getSelectionAmount ( ) == 1 && this . selection . getSelectionType ( ) == "Node" ) { let id = this . selection . getSelectedNodeIds ( ) [ 0 ] ; this . expandNode ( id ) ; this . selection = null ; } else if ( this . selection && this . selection . getSelectionAmount ( ) == 1 && this . selection . getSelectionType ( ) == "Edge" ) { let id = this . selection . getSelectedEdgeIds ( ) [ 0 ] ; this . expandEdge ( id ) ; this . selection = null ; } else { console . log ( "WARNING: attempted to expand given an invalid selection, attempt ignored" ) ; } }
Wrapper to check if the selection is valid for expansion, calls corresponding helper if it is
Wrapper to check if the selection is valid for expansion calls corresponding helper if it is