I'm using the Sketch widget within an Expand widget to make it retractable. However, with this setup, the Undo/Redo functionality doesn't work in real-time; it only functions when I open or close the Expand button. Is there a way to enable the Undo/Redo functionality to work within the Expand widget?
Here is the code I have been using:
let sketchWidgetDraw = new Sketch({
view: view,
layer: graphicsLayer,
tooltipOptions: { enabled: true },
labelOptions: { enabled: true },
visibleElements: {
snappingControlsElements: {
layerList: false
},
},
creationMode: "update",
snappingOptions: {
enabled: true,
featureSources: [{ layer: graphicsLayer, enabled: true }]
},
});
let sketchWidgetExpand = new Expand({
expandIcon: "pencil",
view: view,
content: sketchWidgetDraw,
})