Open akoskm opened 4 years ago
Can I get some feedback here, is this supported @freegroup?
I have created a custom function to do that while pressing the shift key I detect the click event on the node then added a selection to the canvas or get the current selection as an ArrayList then added the node then set the current selection with the new array
Can you share some code here?
let myCanvasPolicy = draw2d.policy.canvas.CanvasPolicy.extend({
name: "MyCanvasPolicy",
shiftSelection: new draw2d.util.ArrayList(),
allowdSwimLane: null,
init: function(attr, setter, getter) {
this._super(attr, setter, getter);
},
onMouseUp: function(canvas, x, y, shiftKey, ctrlKey) {
let bestFigure = canvas.getBestFigure(x, y);
if(shiftKey==true){
// then you can use canvas.addSelection(bestFigure); or some thing like that
}
}
})
then install the policy to your canvas
Thanks, I'll give this a try. 🙇
Is there any way to support multiple selection with PanningSelectionPolicy?
Ideally, I would like to have
BoundingboxSelectionPolicy
installed and I would like the selection to being when I press Shift.If this is not doable I'm OK with selecting multiple elements, one-by-one, while holding Shift.