Added text features (#704)

* Added letter spacing

* Added word spacing

* Added textLength

* Added lengthAdjust

* Added lengthAdjust
master
Timo Dittmann 2022-01-12 10:48:34 +01:00 committed by GitHub
parent 02feff8db5
commit 0a6cce903e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 683 additions and 1 deletions

View File

@ -730,3 +730,137 @@ exports[`use various parts of svg-edit > check tool_text_decoration_overline #0`
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_letter_spacing #0`] = `
<body>
<svg
width="640"
height="480"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<g class="layer">
<title>Layer 1</title>
<text
fill="#bf0000"
font-family="Serif"
font-size="34"
font-style="italic"
font-weight="bold"
id="svg_1"
letter-spacing="10"
stroke="#0000bf"
text-anchor="middle"
text-decoration="underline line-through overline"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
</g>
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_word_spacing #0`] = `
<body>
<svg
width="640"
height="480"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<g class="layer">
<title>Layer 1</title>
<text
fill="#bf0000"
font-family="Serif"
font-size="34"
font-style="italic"
font-weight="bold"
id="svg_1"
letter-spacing="10"
stroke="#0000bf"
text-anchor="middle"
text-decoration="underline line-through overline"
word-spacing="15"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
</g>
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_text_length #0`] = `
<body>
<svg
width="640"
height="480"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<g class="layer">
<title>Layer 1</title>
<text
fill="#bf0000"
font-family="Serif"
font-size="34"
font-style="italic"
font-weight="bold"
id="svg_1"
letter-spacing="10"
stroke="#0000bf"
text-anchor="middle"
text-decoration="underline line-through overline"
textLength="20"
word-spacing="15"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
</g>
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_length_adjust #0`] = `
<body>
<svg
width="640"
height="480"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<g class="layer">
<title>Layer 1</title>
<text
fill="#bf0000"
font-family="Serif"
font-size="34"
font-style="italic"
font-weight="bold"
id="svg_1"
lengthAdjust="spacingAndGlyphs"
letter-spacing="10"
stroke="#0000bf"
text-anchor="middle"
text-decoration="underline line-through overline"
textLength="20"
word-spacing="15"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
</g>
</svg>
</body>
`;

View File

@ -181,4 +181,33 @@ describe('use various parts of svg-edit', function () {
.click({ force: true })
testSnapshot()
})
it('check tool_letter_spacing', function () {
cy.get('#svg_1').click({ force: true })
for (let n = 0; n < 10; n++) {
cy.get('#tool_letter_spacing').shadow().find('elix-number-spin-box').eq(0).shadow().find('#upButton').eq(0)
.click({ force: true })
}
testSnapshot()
})
it('check tool_word_spacing', function () {
cy.get('#svg_1').click({ force: true })
for (let n = 0; n < 15; n++) {
cy.get('#tool_word_spacing').shadow().find('elix-number-spin-box').eq(0).shadow().find('#upButton').eq(0)
.click({ force: true })
}
testSnapshot()
})
it('check tool_text_length', function () {
cy.get('#svg_1').click({ force: true })
for (let n = 0; n < 20; n++) {
cy.get('#tool_text_length').shadow().find('elix-number-spin-box').eq(0).shadow().find('#upButton').eq(0)
.click({ force: true })
}
testSnapshot()
})
it('check tool_length_adjust', function () {
cy.get('#svg_1').click({ force: true })
cy.get('#tool_length_adjust').shadow().find('select').select(1)
testSnapshot()
})
})

View File

@ -0,0 +1,17 @@
<svg width="29" height="29" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:se="http://svg-edit.googlecode.com" data-name="Ebene 1">
<defs>
<marker id="se_marker_start_svg_3" markerHeight="5" markerWidth="5" orient="auto" refX="50" refY="50" viewBox="0 0 100 100">
<path d="m0,50l100,40l-30,-40l30,-40l-100,40z" fill="#f9bc01" id="svg_1" stroke="#f9bc01" stroke-width="10"/>
</marker>
<marker id="se_marker_end_svg_3" markerHeight="5" markerWidth="5" orient="auto" refX="50" refY="50" viewBox="0 0 100 100">
<path d="m100,50l-100,40l30,-40l-30,-40l100,40z" fill="#f9bc01" id="svg_4" stroke="#f9bc01" stroke-width="10"/>
</marker>
</defs>
<g class="layer">
<title>Layer 1</title>
<g id="svg_5">
<text fill="#000000" font-family="serif" font-size="24" id="svg_2" stroke="#000000" stroke-width="0" text-anchor="middle" x="15.25" xml:space="preserve" y="20.5">ab</text>
<line fill="none" id="svg_3" marker-end="url(#se_marker_end_svg_3)" marker-start="url(#se_marker_start_svg_3)" stroke="#f9bc01" x1="4.75" x2="24.64486" y1="25.75" y2="25.75"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,19 @@
<svg width="640" height="640" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<defs>
<marker id="se_marker_start_svg_7" markerHeight="5" markerWidth="5" orient="auto" refX="50" refY="50" se_type="leftarrow" viewBox="0 0 100 100">
<path d="m0,50l100,40l-30,-40l30,-40z" fill="#f9bc01" stroke="#f9bc01" stroke-width="10"/>
</marker>
<marker id="se_marker_start_svg_8" markerHeight="5" markerWidth="5" orient="auto" refX="50" refY="50" se_type="leftarrow" viewBox="0 0 100 100">
<path d="m0,50l100,40l-30,-40l30,-40z" fill="#f9bc01" stroke="#f9bc01" stroke-width="10"/>
</marker>
</defs>
<g class="layer">
<path d="m604.14144,302.46208l-129.55032,-129.56196c-4.53917,-4.54034 -11.87285,-4.54034 -16.41202,0l-415.19232,415.22374c-4.53917,4.54034 -4.53917,11.87401 0,16.41318l129.55148,129.56079c2.21139,2.21139 5.12112,3.37528 8.26479,3.37528s6.05223,-1.28028 8.26479,-3.37528l415.19115,-415.22374c4.42162,-4.53917 4.42162,-11.87285 -0.11755,-16.41202zm-62.04002,45.5151l0,0l-57.03529,-56.22522c-4.53917,-4.54034 -11.98924,-4.42395 -16.41202,0.11639c-4.53917,4.54034 -4.42278,11.9904 0.11639,16.41318l56.9189,56.10767l-25.14236,25.14353l-26.77181,-26.77414c-4.53917,-4.54034 -11.87285,-4.54034 -16.41202,0c-4.53917,4.54034 -4.53917,11.87401 0,16.41318l26.77181,26.77414l-24.79319,24.79436l-56.56973,-56.45683c-4.53917,-4.54034 -11.87285,-4.54034 -16.41202,0c-4.53917,4.54034 -4.53917,11.87401 0,16.41318l56.56973,56.45683l-24.79319,24.79436l-26.77181,-26.77414c-4.53917,-4.54034 -11.87285,-4.54034 -16.41202,0c-4.53917,4.54034 -4.53917,11.87401 0,16.41318l26.77181,26.77414l-25.25875,25.25991l-55.98779,-56.92355c-4.53917,-4.54034 -11.87285,-4.65673 -16.41202,-0.11639c-4.53917,4.54034 -4.65556,11.87401 -0.11639,16.41318l56.22057,57.03994l-24.79319,24.79436l-27.23736,-27.23969c-4.53917,-4.54034 -11.87285,-4.54034 -16.41202,0c-4.53917,4.54034 -4.53917,11.87401 0,16.41318l27.23736,27.23969l-24.79319,24.79436l-51.21467,-50.4046c-4.53917,-4.54034 -11.98924,-4.42395 -16.41202,0.11639c-4.53917,4.54034 -4.42278,11.9904 0.11639,16.41318l51.09828,50.28822l-96.60989,96.61804l-113.02191,-113.03122l398.77913,-398.81056l113.02191,113.03122l-37.8276,37.72053z" fill="black" id="svg_3" transform="rotate(45 323.572 453.484)"/>
<path d="m132.49333,459.864c-12.101,-11.002 -31.002,-10.802 -42.103,0.3c-6.1,6.101 -9.301,13.902 -9.101,22.203c0.2,7.701 3.4,14.902 9.101,20.203c5.3,5.701 12.401,8.901 20.202,9.101c0.2,0 0.5,0 0.7,0l0,0c8.001,0 15.601,-3.201 21.602,-9.001c11.101,-11.202 11.301,-30.005 0.3,-42.106c-0.201,-0.299 -0.501,-0.5 -0.701,-0.7zm-13.901,28.705c-2.2,2.1 -4.9,3.201 -7.601,3.201c-1.7,-0.1 -4.1,-0.6 -6.2,-2.9c-0.2,-0.3 -0.5,-0.5 -0.7,-0.7c-2.3,-2 -2.9,-4.501 -2.9,-6.201c-0.1,-2.8 1.1,-5.501 3.2,-7.601c1.8,-1.7 4.3,-2.6 6.8,-2.6c2.6,0 5.3,0.9 7.401,2.7c3.5,4.199 3.5,10.6 0,14.101z" fill="black" id="svg_2"/>
<text fill="#000000" font-family="serif" font-size="293" font-weight="bold" id="svg_1" stroke-width="0" text-anchor="middle" x="319.9375" xml:space="preserve" y="319.3125">A</text>
<line fill="none" id="svg_4" stroke="#000000" stroke-width="10" x1="32.0625" x2="32.0625" y1="138.75" y2="329.75262"/>
<line fill="none" id="svg_5" stroke="#000000" stroke-width="10" x1="613.1875" x2="613.1875" y1="137.93619" y2="328.93881"/>
<line fill="none" id="svg_7" marker-start="url(#se_marker_start_svg_7)" stroke="#f9bc01" stroke-width="10" transform="rotate(-90 153.125 240.625)" x1="153.125" x2="153.125" y1="178.125" y2="303.125"/>
<line fill="none" id="svg_8" marker-start="url(#se_marker_start_svg_8)" stroke="#f9bc01" stroke-width="10" transform="rotate(90 503.125 240.625)" x1="503.125" x2="503.125" y1="178.125" y2="303.125"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,15 @@
<svg width="44" height="44" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<defs>
<marker id="se_marker_start_svg_2" markerHeight="5" markerWidth="5" orient="auto" refX="50" refY="50" viewBox="0 0 100 100">
<path d="m0,50l100,40l-30,-40l30,-40l-100,40z" fill="#f9bc01" id="svg_3" stroke="#f9bc01" stroke-width="10"/>
</marker>
<marker id="se_marker_end_svg_2" markerHeight="5" markerWidth="5" orient="auto" refX="50" refY="50" viewBox="0 0 100 100">
<path d="m100,50l-100,40l30,-40l-30,-40l100,40z" fill="#f9bc01" id="svg_4" stroke="#f9bc01" stroke-width="10"/>
</marker>
</defs>
<g class="layer">
<title>Layer 1</title>
<text fill="#000000" font-family="serif" font-size="15" id="svg_1" stroke="#000000" stroke-width="0" text-anchor="middle" x="22.78779" xml:space="preserve" y="26.00814">A B</text>
<line fill="none" id="svg_2" marker-end="url(#se_marker_end_svg_2)" marker-start="url(#se_marker_start_svg_2)" stroke="#f9bc01" x1="16.19377" x2="29.36873" y1="20.75" y2="20.75"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -79,6 +79,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Den Text linksbündig ausrichten',
text_anchor_middle: 'Den Text zentriert ausrichten',
text_anchor_end: 'Den Text rechtsbündig ausrichten',
text_letter_spacing: 'Den Abstand zwischen den Buchstaben anpassen',
text_word_spacing: 'Den Abstand zwischen den Wörtern anpassen',
text_length: 'Die Breite, in dem der Text gezeichnet wird',
text_length_adjust: 'Länge anpassen',
text_length_adjust_spacing: 'Leerzeichen',
text_length_adjust_spacing_and_glyphs: 'Leerzeichen & Buchstaben',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -81,6 +81,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
r_label: 'r',
x_label: 'x',
y_label: 'y',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -79,6 +79,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -81,6 +81,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -80,6 +80,12 @@ export default {
text_anchor_start: 'Align the text in start',
text_anchor_middle: 'Align the text in middle',
text_anchor_end: 'Align the text in end',
text_letter_spacing: 'Change the letter spacing',
text_word_spacing: 'Change the word spacing',
text_length: 'Lets you specify the width of the space into which the text will draw',
text_length_adjust: 'Length adjust',
text_length_adjust_spacing: 'Spacing',
text_length_adjust_spacing_and_glyphs: 'Spacing & Glyphs',
class: 'Element class',
serif: 'Serif',
sans_serif: 'Sans-serif',

View File

@ -150,6 +150,22 @@
<se-list-item id="tool_text_anchor_end" value="end" title="properties.text_anchor_end" src="anchor_end.svg" img-height="25px"></se-list-item>
</se-list>
<!-- Letter Spacing -->
<se-spin-input size="2" id="tool_letter_spacing" min=0 max=100 step=1 title="properties.text_letter_spacing"
src="letter_spacing.svg"></se-spin-input>
<!-- Word Spacing -->
<se-spin-input size="2" id="tool_word_spacing" min=0 max=1000 step=1 title="properties.text_word_spacing"
src="word_spacing.svg"></se-spin-input>
<!-- Text Length -->
<se-spin-input size="2" id="tool_text_length" min=0 max=1000 step=1 title="properties.text_length"
src="text_length.svg"></se-spin-input>
<!-- Length Adjust -->
<se-select id="tool_length_adjust" label="properties.text_length_adjust"
options="properties.text_length_adjust_spacing,properties.text_length_adjust_spacing_and_glyphs"
values="spacing::spacingAndGlyphs"></se-select>
</div>
<!-- Not visible, but still used -->
<input id="text" type="text" size="35"/>

View File

@ -358,6 +358,10 @@ class TopPanel {
$id('tool_font_family').setAttribute('value', elem.getAttribute('font-family'))
$id('tool_text_anchor').setAttribute('value', elem.getAttribute('text-anchor'))
$id('font_size').value = elem.getAttribute('font-size')
$id('tool_letter_spacing').value = elem.getAttribute('letter-spacing') ?? 0
$id('tool_word_spacing').value = elem.getAttribute('word-spacing') ?? 0
$id('tool_text_length').value = elem.getAttribute('textLength') ?? 0
$id('tool_length_adjust').value = elem.getAttribute('lengthAdjust') ?? 0
$id('text').value = elem.textContent
if (this.editor.svgCanvas.addedNew) {
// Timeout needed for IE9
@ -773,6 +777,34 @@ class TopPanel {
return false
}
/**
* @type {module}
*/
changeLetterSpacing (e) {
this.editor.svgCanvas.setLetterSpacing(e.target.value)
}
/**
* @type {module}
*/
changeWordSpacing (e) {
this.editor.svgCanvas.setWordSpacing(e.target.value)
}
/**
* @type {module}
*/
changeTextLength (e) {
this.editor.svgCanvas.setTextLength(e.target.value)
}
/**
* @type {module}
*/
changeLengthAdjust (evt) {
this.editor.svgCanvas.setLengthAdjust(evt.detail.value)
}
/**
* Set a selected image's URL.
* @function module:SVGthis.setImageURL
@ -892,6 +924,10 @@ class TopPanel {
$click($id('tool_text_decoration_linethrough'), () => this.clickTextDecoration.bind(this)('line-through'))
$click($id('tool_text_decoration_overline'), () => this.clickTextDecoration.bind(this)('overline'))
$id('tool_text_anchor').addEventListener('change', (evt) => this.clickTextAnchor.bind(this)(evt))
$id('tool_letter_spacing').addEventListener('change', this.changeLetterSpacing.bind(this))
$id('tool_word_spacing').addEventListener('change', this.changeWordSpacing.bind(this))
$id('tool_text_length').addEventListener('change', this.changeTextLength.bind(this))
$id('tool_length_adjust').addEventListener('change', (evt) => this.changeLengthAdjust.bind(this)(evt))
$click($id('tool_unlink_use'), this.clickGroup.bind(this))
$id('image_url').addEventListener('change', (evt) => { this.setImageURL(evt.currentTarget.value) });

View File

@ -690,6 +690,70 @@ export const setTextAnchorMethod = (value) => {
}
}
/**
* @function module:svgcanvas.SvgCanvas#setLetterSpacingMethod Set the new letter spacing
* @param {string} value - The letter spacing value
* @returns {void}
*/
export const setLetterSpacingMethod = (value) => {
const selectedElements = svgCanvas.getSelectedElements()
const selected = selectedElements[0]
if (selected?.tagName === 'text' && !selectedElements[1]) {
svgCanvas.changeSelectedAttribute('letter-spacing', value)
}
if (selectedElements.length > 0 && !selectedElements[0].textContent) {
svgCanvas.textActions.setCursor()
}
}
/**
* @function module:svgcanvas.SvgCanvas#setWordSpacingMethod Set the new word spacing
* @param {string} value - The word spacing value
* @returns {void}
*/
export const setWordSpacingMethod = (value) => {
const selectedElements = svgCanvas.getSelectedElements()
const selected = selectedElements[0]
if (selected?.tagName === 'text' && !selectedElements[1]) {
svgCanvas.changeSelectedAttribute('word-spacing', value)
}
if (selectedElements.length > 0 && !selectedElements[0].textContent) {
svgCanvas.textActions.setCursor()
}
}
/**
* @function module:svgcanvas.SvgCanvas#setTextLengthMethod Set the new text length
* @param {string} value - The text length value
* @returns {void}
*/
export const setTextLengthMethod = (value) => {
const selectedElements = svgCanvas.getSelectedElements()
const selected = selectedElements[0]
if (selected?.tagName === 'text' && !selectedElements[1]) {
svgCanvas.changeSelectedAttribute('textLength', value)
}
if (selectedElements.length > 0 && !selectedElements[0].textContent) {
svgCanvas.textActions.setCursor()
}
}
/**
* @function module:svgcanvas.SvgCanvas#setLengthAdjustMethod Set the new length adjust
* @param {string} value - The length adjust value
* @returns {void}
*/
export const setLengthAdjustMethod = (value) => {
const selectedElements = svgCanvas.getSelectedElements()
const selected = selectedElements[0]
if (selected?.tagName === 'text' && !selectedElements[1]) {
svgCanvas.changeSelectedAttribute('lengthAdjust', value)
}
if (selectedElements.length > 0 && !selectedElements[0].textContent) {
svgCanvas.textActions.setCursor()
}
}
/**
* @function module:svgcanvas.SvgCanvas#getFontFamily
* @returns {string} The current font family

View File

@ -56,7 +56,7 @@ const svgWhiteList_ = {
svg: ['clip-path', 'clip-rule', 'enable-background', 'filter', 'height', 'mask', 'preserveAspectRatio', 'requiredFeatures', 'systemLanguage', 'version', 'viewBox', 'width', 'x', 'xmlns', 'xmlns:se', 'xmlns:xlink', 'xmlns:oi', 'oi:animations', 'y', 'stroke-linejoin', 'fill-rule', 'aria-label', 'stroke-width', 'fill-rule', 'xml:space'],
switch: ['requiredFeatures', 'systemLanguage'],
symbol: ['fill', 'fill-opacity', 'fill-rule', 'filter', 'font-family', 'font-size', 'font-style', 'font-weight', 'opacity', 'overflow', 'preserveAspectRatio', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'systemLanguage', 'viewBox', 'width', 'height'],
text: ['clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'font-family', 'font-size', 'font-style', 'font-weight', 'mask', 'opacity', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'systemLanguage', 'text-anchor', 'text-decoration', 'x', 'xml:space', 'y'],
text: ['clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'font-family', 'font-size', 'font-style', 'font-weight', 'mask', 'opacity', 'requiredFeatures', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'systemLanguage', 'text-anchor', 'letter-spacing', 'word-spacing', 'text-decoration', 'textLength', 'lengthAdjust', 'x', 'xml:space', 'y'],
textPath: ['method', 'requiredFeatures', 'spacing', 'startOffset', 'systemLanguage', 'xlink:href'],
title: [],
tspan: ['clip-path', 'clip-rule', 'dx', 'dy', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'font-family', 'font-size', 'font-style', 'font-weight', 'mask', 'opacity', 'requiredFeatures', 'rotate', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'systemLanguage', 'text-anchor', 'textLength', 'x', 'xml:space', 'y'],

View File

@ -904,6 +904,10 @@ class SvgCanvas {
this.addTextDecoration = elemGetSet.addTextDecorationMethod // Adds the given value to the text decoration
this.removeTextDecoration = elemGetSet.removeTextDecorationMethod // Removes the given value from the text decoration
this.setTextAnchor = elemGetSet.setTextAnchorMethod // Set the new text anchor.
this.setLetterSpacing = elemGetSet.setLetterSpacingMethod // Set the new letter spacing.
this.setWordSpacing = elemGetSet.setWordSpacingMethod // Set the new word spacing.
this.setTextLength = elemGetSet.setTextLengthMethod // Set the new text length.
this.setLengthAdjust = elemGetSet.setLengthAdjustMethod // Set the new length adjust.
this.getFontFamily = elemGetSet.getFontFamilyMethod // The current font family
this.setFontFamily = elemGetSet.setFontFamilyMethod // Set the new font family.
this.setFontColor = elemGetSet.setFontColorMethod // Set the new font color.