192
193 let node = this._nodeStyles.node;
194 let isSVGElement = node.isSVGElement();
195
196 this._groups.float.section.element.classList.toggle("inactive", isSVGElement);
197 this._groups.content.section.element.classList.toggle("inactive", isSVGElement);
198 this._groups.fill.section.element.classList.toggle("inactive", !isSVGElement);
199 this._groups.stroke.section.element.classList.toggle("inactive", !isSVGElement);
200 this._groups.border.section.element.classList.toggle("inactive", isSVGElement);
201 this._groups.boxShadow.section.element.classList.toggle("inactive", isSVGElement);
202 this._groups.listStyle.section.element.classList.toggle("inactive", isSVGElement);
203
204 let isSVGCircle = node.nodeName() === "circle";
205 let isSVGEllipse = node.nodeName() === "ellipse";
206 let isSVGRadialGradient = node.nodeName() === "radialGradient";
207 let isSVGRect = node.nodeName() === "rect";
208 let isSVGLine = node.nodeName() === "line";
209 let isSVGLinearGradient = node.nodeName() === "linearGradient";
210
211 // Only show the dimensions section if the current element is not an SVG element or is <ellipse>, <rect>, <circle>, or <radialGradient>.
212 this._groups.dimensions.section.element.classList.toggle("inactive", !(!isSVGElement || isSVGEllipse || isSVGRect || isSVGCircle || isSVGRadialGradient));
213
214 // Only show the non-SVG dimensions group if the current element is not an SVG element or is <rect>.
215 this._groups.dimensions.defaultGroup.element.classList.toggle("inactive", !(!isSVGElement || isSVGRect));
216
217 // Only show the SVG dimensions group if the current element is an SVG element, <rect>, <circle>, or <radialGradient>.
218 this._groups.dimensions.svgGroup.element.classList.toggle("inactive", !(isSVGEllipse || isSVGRect || isSVGCircle || isSVGRadialGradient));
219
220 // Only show editor for "r" if the current element is <circle> or <radialGradient>.
221 this._groups.dimensions.properties.r.element.classList.toggle("inactive", !(isSVGCircle || isSVGRadialGradient));
222
223 // Only show editors for "rx" and "ry" if the current element is <ellipse> or <rect>.
224 this._groups.dimensions.properties.rx.element.classList.toggle("inactive", !(isSVGEllipse || isSVGRect));
225 this._groups.dimensions.properties.ry.element.classList.toggle("inactive", !(isSVGEllipse || isSVGRect));
226
227 // Only show the SVG position group if the current element is <rect>, <circle>, <ellipse>, <line>, <radialGradient>, or <linearGradient>.
228 this._groups.position.svgGroup.element.classList.toggle("inactive", !(isSVGRect || isSVGCircle || isSVGEllipse || isSVGLine || isSVGRadialGradient || isSVGLinearGradient));
229
230 // Only show editors for "x" and "y" if the current element is <rect>.
231 this._groups.position.properties.x.element.classList.toggle("inactive", !isSVGRect);
232 this._groups.position.properties.y.element.classList.toggle("inactive", !isSVGRect);
233
234 // Only show editors for "x1", "y1", "x2", and "y2" if the current element is <line> or <linearGradient>.
235 this._groups.position.properties.x1.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
236 this._groups.position.properties.y1.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
237 this._groups.position.properties.x2.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
238 this._groups.position.properties.y2.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
239
240 // Only show editors for "cx" and "cy" if the current element is <circle>, <ellipse>, or <radialGradient>.
241 this._groups.position.properties.cx.element.classList.toggle("inactive", !(isSVGCircle || isSVGEllipse || isSVGRadialGradient));
242 this._groups.position.properties.cy.element.classList.toggle("inactive", !(isSVGCircle || isSVGEllipse || isSVGRadialGradient));