Add text label to widget button

137
0
03-27-2024 12:15 PM
JasonJordan00
Occasional Contributor

Is there a way to display a label next to the widget in the View UI? For instance I would like to place text that says "Draw an outline" that is anchored to the button here. Thanks!

 

view.when(() => {
const sketch = new Sketch({
layer: graphicsLayer,
view: view,
creationMode: "update",
snappingOptions: {
enabled: true,
featureSources: [
{ layer: graphicsLayer, enabled: true },
{ layer: rafterGraphicsLayer, enabled: true },
],
},
tooltipOptions: { enabled: true },
labelOptions: { enabled: true },
visibleElements: {
createTools: {
point: false,
rectangle: false,
polyline: false,
polygon: true,
circle: false,
},
selectionTools: {
"lasso-selection": false,
"rectangle-selection": false,
},
settingsMenu: false,
undoRedoMenu: false,
duplicateButton: false
}
});
view.ui.add(sketch, "top-right");
})

0 Kudos
0 Replies