Reputation: 93
I'm working on a project where I will be selecting canvas objects via HTML buttons. I'm able to select individual objects just fine. The issue I'm having is when trying to select multiple buttons which then select the corresponding objects on the canvas. It seems when using canvas.setActiveObject(theCanvasObject)
it deselects the current selected object and replaces it with the new one. Is there a way to add new objects to the active objects selection?
Upvotes: 1
Views: 308
Reputation: 1236
var sel = new ActiveSelection(selectMultipleList.current);
canvas.setActiveObject(sel);
canvas.requestRenderAll();
Upvotes: 0