Hello All,
is there a way to modify part of a symbol used for a graphic, e.g. outline color, w/o re-creating the whole symbol?
something like this:
function mapClickHandler(hitTestResult) {
const graphic = hitTestResult.results[0].graphic
// does not work
graphic.symbol.outline.color = new Color("red")
// nor does the setColor method
graphic.symbol.outline.color.setColor("red")
// nor does re-creating just the SLS:
graphic.symbol.outline = {
type: "simple-line",
width: 2,
color: [213, 23, 23, 1]
}
// this works but seems like a hack
const symbol_copy = graphic.symbol.toJSON()
symbol_copy.outline.color = new Color("red")
graphic.symbol = fromJSON(symbol_copy)
}