I would like to add custom tool that would allow me to add polygon part to existing multipolygon feature. I believe there is not such tool available but I have an idea how to implement it. The problem is that I don't know how to add a button in editor widget in "Edit features" section. Is it possible or should i write editing panel from scratch?
Esri has an Editor sample page title 'Popup with edit action' at https://developers.arcgis.com/javascript/latest/sample-code/popup-editaction/ . This sample adds a button to the editor by looking for a specific DOM node using this:
// Use the editor's back button as a way to cancel out of editing
let arrComp = editor.domNode.getElementsByClassName(
"esri-editor__back-button esri-interactive"
);
if (arrComp.length === 1) {
// Add a tooltip for the back button
arrComp[0].setAttribute(
"title",
"Cancel edits, return to popup"
);
// Add a listener to listen for when the editor's back button is clicked
arrComp[0].addEventListener("click", (evt) => {...
At version 4.23 this was broken however, as Esri decided to change the Editor widget to utilize Calcite theming. The issue is that on widget creation, the specific Dom node is no longer exposed. I started a ticket with Esri but the only response is that yes, this sample no longer works.
With that, I'm stuck at version 4.22 in one of my projects because the editing process follows this example. I attach to the back button like in this example and add 2 buttons to open separate widgets I developed to edit related tables (using Dojo Dgrid). I tried to figure out how to attach to the Dom location using the new Calcite theming but can't figure it out, and since Esri has just punted on the request I'm guessing they can't either. I don't know why they just decided to rebuild the whole widget in a new way, but I sure wish they'd ask us first (sorry, my soapbox rant).