Select all nodes functionality added

This commit is contained in:
barsdeveloper
2022-01-13 20:07:58 +01:00
parent 41b741e8b8
commit ce5b184b3d
10 changed files with 389 additions and 59 deletions

View File

@@ -13,6 +13,7 @@ import Select from "./input/mouse/Select"
import Unfocus from "./input/mouse/Unfocus"
import Utility from "./Utility"
import Zoom from "./input/mouse/Zoom"
import KeyboardSelectAll from "./input/keybaord/KeyboardSelectAll"
export default class Blueprint extends GraphElement {
@@ -93,9 +94,11 @@ export default class Blueprint extends GraphElement {
createInputObjects() {
return [
new Copy(this.getGridDOMElement(), this),
new Paste(this.getGridDOMElement(), this),
new KeyboardCanc(this.getGridDOMElement(), this),
new KeyboardSelectAll(this.getGridDOMElement, this),
new Zoom(this.getGridDOMElement(), this, {
looseTarget: true,
}),
@@ -111,7 +114,7 @@ export default class Blueprint extends GraphElement {
moveEverywhere: true,
}),
new Unfocus(this.getGridDOMElement(), this),
new MouseTracking(this.getGridDOMElement(), this),
new MouseTracking(this.getGridDOMElement(), this)
]
}
@@ -297,6 +300,13 @@ export default class Blueprint extends GraphElement {
}
}
/**
* Select all nodes
*/
selectAll() {
this.nodes.forEach(node => this.nodeSelectToggleFunction(node, true))
}
/**
* Unselect all nodes
*/