4.x Sketch widget in a side panel?

621
2
Jump to solution
07-18-2019 04:27 PM
SteveCole
Frequent Contributor

3.x to 4.x migration pains- Can you place the sketch widget in a div located outside of the map? I'm developing an app which uses an AccordionPane to define a workflow and one step is to draw a graphic and I'd like to place the widget in one of the AccordionPanes. The Sketch widget sample uses "view.ui.add()" to place the sketch widget into the map but I don't see another way to specify where the widget is placed.

Thanks!

Steve

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

Use the container property to put it into a div

const sketch = new Sketch({
  layer: layer,
  view: view,
  container: document.getElementById("myDiv")
});‍‍‍‍‍

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

Use the container property to put it into a div

const sketch = new Sketch({
  layer: layer,
  view: view,
  container: document.getElementById("myDiv")
});‍‍‍‍‍
SteveCole
Frequent Contributor

Perfect! Thanks Ken.

0 Kudos