I'd like to invoke a sketch widget tool from a button click as opposed to the widget itself. Can this be done?
const sketch = new Sketch({
layer: graphicsLayer,
view: view,
creationMode: 'update',
availableCreateTools: ['rectangle'],
defaultUpdateOptions: {
enableRotation: false,
toggleToolOnClick: false
},
visibleElements: {
selectionTools: {
"lasso-selection": false,
"rectangle-selection": false,
},
undoRedoMenu: false
}
});
view.ui.add(sketch, "top-right");
Thanks.