Select to view content in your preferred language

Undo/Redo doesn't work with Sketch in a Expand

392
0
10-23-2023 06:47 AM
arc_ticodex
Regular Contributor

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,
    })
0 Kudos
0 Replies