Select to view content in your preferred language

Sketch widget and Expand widget not playing nice in 4.30/angular?

80
1
yesterday
AndrewVitale
New Contributor III

I'm using ArcGIS SDK 4.30 with `web-components` seasoning. Sometimes `web-components-angular`, too.

When using `arcgis-sketch` component inside of an `arcgis-expand` container, the sketches seem to "register" in the `GraphicsLayer`. They are not visible on the map. They are selectable. See this Code Pen as an example (bottom-left sketch works fine without an expand, bottom-right sketch seems buggy with expand):

https://codepen.io/vitale232/pen/WNqXMvg

I've seen the same behavior in an Angular app that depends on `@arcgis/map-components-angular` as well. Just add this markup to the sample:

https://github.com/Esri/jsapi-resources/tree/main/component-samples/map-components/samples/angular

 

<arcgis-expand expanded position="bottom-right">
  <arcgis-sketch></arcgis-sketch>
</arcgis-expand>

 

Interestingly, I have an Angular component library with a public API similar to that of the `map-components` packages. The Sketch widget simply doesn't work there on 4.29+. Clicking on one of the Sketch tools never activates it.

If I use devtools to inspect the `calcite-action` elements that makeup the sketch UI, it does appear the click events are firing correctly.

Has anyone else experienced odd behaviors with Sketch and Expand in `core` 4.29+ or `web-components` 4.30+? Does anyone else using Angular 15+ and ES Modules have similar issues? Any ideas on how to further troubleshoot this? Thanks!

0 Kudos
1 Reply
TrishPeller
New Contributor

I am using map-components-react 4.30. I can't get graphics to display after sketching. The in-progress graphics are rendered fine, but when the sketching is completed, the graphic disappears. It's similar to this issue here: https://github.com/Esri/esri-loader/issues/262. Don't know if it's related to your issue.

0 Kudos