- Added text decoration options (underline, overline, line-through) (#469)

- Added german translations to extensions

Co-authored-by: Timo Dittmann <timo.dittmann@kaufland.com>
This commit is contained in:
Timo Dittmann
2021-01-19 00:35:24 +01:00
committed by GitHub
parent c0f55416a3
commit 35e6de97ef
30 changed files with 684 additions and 299 deletions

View File

@@ -486,12 +486,13 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
id="svg_1"
font-size="24"
font-family="serif"
text-anchor="middle"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-style="italic"
font-weight="bold"
text-decoration=" underline overline line-through"
>
B
</text>
@@ -522,7 +523,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
radialshift=""
r2="5.333333333333334"
orient="point"
fill="#000000"
fill="#ffff00"
strokecolor="#000000"
strokeWidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
@@ -577,12 +578,13 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
id="svg_1"
font-size="24"
font-family="serif"
text-anchor="middle"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-style="italic"
font-weight="bold"
text-decoration=" underline overline line-through"
>
B
</text>
@@ -613,7 +615,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
radialshift=""
r2="5.333333333333334"
orient="point"
fill="#000000"
fill="#ffff00"
strokecolor="#000000"
strokeWidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
@@ -631,7 +633,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
sides="5"
orient="x"
edge="6.666666666666667"
fill="#000000"
fill="#ffff00"
strokecolor="#000000"
strokeWidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
@@ -685,7 +687,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
id="svg_1"
font-size="24"
font-family="serif"
text-anchor="middle"
text-anchor="start"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
@@ -711,62 +713,6 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
>
B
</text>
<polygon
cx="407"
cy="45"
id="svg_3"
shape="star"
point="5"
r="13.333333333333334"
radialshift=""
r2="5.333333333333334"
orient="point"
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
stroke-opacity="1"
></polygon>
<polygon
cx="457"
cy="95"
id="svg_4"
shape="regularPoly"
sides="5"
orient="x"
edge="6.666666666666667"
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"
stroke-opacity="1"
></polygon>
<polygon
cx="115"
cy="79"
id="svg_5"
shape="regularPoly"
sides="5"
orient="x"
edge="0"
fill="#000000"
strokecolor="#000000"
strokewidth="5"
>
<animate
attributeName="opacity"
begin="indefinite"
dur="0.2"
fill="freeze"
to="1"
></animate>
</polygon>
</g>
</svg>
`;
@@ -832,77 +778,6 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
>
B
</text>
<polygon
cx="407"
cy="45"
id="svg_3"
shape="star"
point="5"
r="13.333333333333334"
radialshift=""
r2="5.333333333333334"
orient="point"
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
stroke-opacity="1"
></polygon>
<polygon
cx="457"
cy="95"
id="svg_4"
shape="regularPoly"
sides="5"
orient="x"
edge="6.666666666666667"
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"
stroke-opacity="1"
></polygon>
<polygon
cx="115"
cy="79"
id="svg_5"
shape="regularPoly"
sides="5"
orient="x"
edge="0"
fill="#000000"
strokecolor="#000000"
strokewidth="5"
fill-opacity="1"
stroke="none"
stroke-opacity="1"
></polygon>
<polygon
cx="115"
cy="79"
id="svg_6"
shape="regularPoly"
sides="5"
orient="x"
edge="0"
fill="#000000"
strokecolor="none"
strokewidth="5"
>
<animate
attributeName="opacity"
begin="indefinite"
dur="0.2"
fill="freeze"
to="1"
></animate>
</polygon>
</g>
</svg>
`;
@@ -942,7 +817,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
id="svg_1"
font-size="24"
font-family="serif"
text-anchor="middle"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
@@ -968,92 +843,204 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
>
B
</text>
<polygon
cx="407"
cy="45"
id="svg_3"
shape="star"
point="5"
r="13.333333333333334"
radialshift=""
r2="5.333333333333334"
orient="point"
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
stroke-opacity="1"
></polygon>
<polygon
cx="457"
cy="95"
id="svg_4"
shape="regularPoly"
sides="5"
orient="x"
edge="6.666666666666667"
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"
stroke-opacity="1"
></polygon>
<polygon
cx="115"
cy="79"
id="svg_5"
shape="regularPoly"
sides="5"
orient="x"
edge="0"
fill="#000000"
strokecolor="#000000"
strokewidth="5"
fill-opacity="1"
stroke="none"
stroke-opacity="1"
></polygon>
<polygon
cx="115"
cy="79"
id="svg_6"
shape="regularPoly"
sides="5"
orient="x"
edge="0"
fill="#000000"
strokecolor="none"
strokewidth="5"
fill-opacity="1"
stroke="none"
stroke-opacity="1"
></polygon>
<polygon
cx="115"
cy="79"
id="svg_7"
shape="regularPoly"
sides="5"
orient="x"
edge="0"
fill="#000000"
strokecolor="none"
strokewidth="5"
>
<animate
attributeName="opacity"
begin="indefinite"
dur="0.2"
fill="freeze"
to="1"
></animate>
</polygon>
</g>
</svg>
`;
exports[`use various parts of svg-edit > check tool_text_decoration_underline #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
font-family="serif"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
text-decoration=" underline"
>
B
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
font-family="serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
</text>
</g>
</svg>
`;
exports[`use various parts of svg-edit > check tool_text_decoration_overline #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
font-family="serif"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
text-decoration=" underline overline"
>
B
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
font-family="serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
</text>
</g>
</svg>
`;
exports[`use various parts of svg-edit > check tool_text_decoration_linethrough #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
font-family="serif"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
text-decoration=" underline overline line-through"
>
B
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
font-family="serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
transform="matrix(1 0 0 1 0 0)"
>
B
</text>
</g>
</svg>
`;

View File

@@ -70,24 +70,6 @@ describe('use various parts of svg-edit', function () {
.click({force: true});
testSnapshot();
});
it('check tool_star', function () {
cy.get('#tool_star')
.click({force: true});
cy.get('#svgcontent')
.trigger('mousedown', {which: 1, pageX: 600, pageY: 150, force: true})
.trigger('mousemove', {which: 1, pageX: 600, pageY: 170, force: true})
.trigger('mouseup', {force: true});
cy.get('#svgcontent').toMatchSnapshot();
});
it('check tool_polygon', function () {
cy.get('#tool_polygon')
.click({force: true});
cy.get('#svgcontent')
.trigger('mousedown', {which: 1, pageX: 650, pageY: 200, force: true})
.trigger('mousemove', {which: 1, pageX: 650, pageY: 210, force: true})
.trigger('mouseup', {force: true});
cy.get('#svgcontent').toMatchSnapshot();
});
it('check tool_text_anchor_start', function () {
cy.get('#svg_1').click({force: true});
cy.get('#tool_text_anchor_start')
@@ -106,4 +88,40 @@ describe('use various parts of svg-edit', function () {
.click({force: true});
testSnapshot();
});
it('check tool_text_decoration_underline', function () {
cy.get('#svg_1').click({force: true});
cy.get('#tool_text_decoration_underline')
.click({force: true});
testSnapshot();
});
it('check tool_text_decoration_overline', function () {
cy.get('#svg_1').click({force: true});
cy.get('#tool_text_decoration_overline')
.click({force: true});
testSnapshot();
});
it('check tool_text_decoration_linethrough', function () {
cy.get('#svg_1').click({force: true});
cy.get('#tool_text_decoration_linethrough')
.click({force: true});
testSnapshot();
});
it('check tool_star', function () {
cy.get('#tool_star')
.click({force: true});
cy.get('#svgcontent')
.trigger('mousedown', {which: 1, pageX: 600, pageY: 150, force: true})
.trigger('mousemove', {which: 1, pageX: 600, pageY: 170, force: true})
.trigger('mouseup', {force: true});
cy.get('#svgcontent').toMatchSnapshot();
});
it('check tool_polygon', function () {
cy.get('#tool_polygon')
.click({force: true});
cy.get('#svgcontent')
.trigger('mousedown', {which: 1, pageX: 650, pageY: 200, force: true})
.trigger('mousemove', {which: 1, pageX: 650, pageY: 210, force: true})
.trigger('mouseup', {force: true});
cy.get('#svgcontent').toMatchSnapshot();
});
});