I want to have a panel that appears when clicking on a child element of an SVG.
This panel should display the properties of the selected object,
and allow direct modification of those properties, which would then affect the element. How can I achieve this?
(pure javascript no use any package)
svgElem.onclick)div)inputfield in the panelinput.onchangeevent handler to update the element's attribute:input.onchange = () => {element.setAttribute(attr.name, input.value)}simple version
Full code
The above example is a relatively concise version. The following example provides more settings, such as:
input.type={color, number, text}, etc.