Added text features (#704)
* Added letter spacing * Added word spacing * Added textLength * Added lengthAdjust * Added lengthAdjust
This commit is contained in:
@@ -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>
|
||||
`;
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user