fix: Enhance text properties for multiple selected elements (SVG-Edit/svgedit#918) (#919)

* fix: Enhance text properties for multiple selected elements (SVG-Edit/svgedit#918)

This commit addresses issue SVG-Edit/svgedit#918 by improving
text property handling when multiple elements are selected.
You can now set Bold, Italic, Text-Decoration, Text-Anchor,
Letter-Spacing, Word-Spacing, Text Length, and Length Adjust.

* Update Editor.js

---------

Co-authored-by: JFH <20402845+jfhenon@users.noreply.github.com>
This commit is contained in:
Mo'ath Zaghdad
2023-09-18 13:38:41 +03:00
committed by GitHub
parent 24b8f74c4d
commit 0895235c17
2 changed files with 81 additions and 91 deletions

View File

@@ -470,7 +470,7 @@ class Editor extends EditorStartup {
const isNode = mode === 'pathedit'
// if this.elems[1] is present, then we have more than one element
this.selectedElement = elems.length === 1 || !elems[1] ? elems[0] : null
this.multiselected = elems.length >= 2 && elems[1]
this.multiselected = elems.length >= 2 && !!elems[1]
if (this.selectedElement && !isNode) {
this.topPanel.update()
} // if (elem)