Extensions (#737)

- add the current document title in the toolbar
- allow user extensions to define optional parameters
- more events for renamedElement, beforeClear, afterClear, sourceChanged
- remove "message" event used for iframe integration not used anymore. can be readded through a new extension if necessary
- default precision down to 2 digits (and applied in rotation)
master
JFH 2022-03-13 12:59:53 +01:00 committed by GitHub
parent 95f9ea3abb
commit a335e44dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 457 additions and 512 deletions

View File

@ -2,6 +2,9 @@
## 7.1.2 ## 7.1.2
- add the current document title in the toolbar - add the current document title in the toolbar
- allow user extensions to define optional parameters - allow user extensions to define optional parameters
- more events for renamedElement, beforeClear, afterClear, sourceChanged
- remove "message" event used for iframe integration not used anymore. can be readded through a new extension if necessary
- default precision down to 2 digits (and applied in rotation)
## 7.1.1 ## 7.1.1
- Fix an issue when moving a text with an existing transformation (issue #689) - Fix an issue when moving a text with an existing transformation (issue #689)
## 7.1.0 ## 7.1.0

View File

@ -13,22 +13,7 @@ exports[`use various parts of svg-edit > check tool_source #0`] = `
</body> </body>
`; `;
exports[`use various parts of svg-edit > check tool_fhpath #0`] = ` exports[`use various parts of svg-edit > force svg #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>
</g>
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_text #0`] = `
<body> <body>
<svg <svg
width="640" width="640"
@ -46,9 +31,9 @@ exports[`use various parts of svg-edit > check tool_text #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -75,9 +60,9 @@ exports[`use various parts of svg-edit > check tool_clone #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -89,9 +74,9 @@ exports[`use various parts of svg-edit > check tool_clone #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
x="66" x="120"
xml:space="preserve" xml:space="preserve"
y="55" y="120"
> >
AB AB
</text> </text>
@ -119,9 +104,9 @@ exports[`use various parts of svg-edit > check tool_italic #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -134,9 +119,9 @@ exports[`use various parts of svg-edit > check tool_italic #0`] = `
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="66" x="120"
xml:space="preserve" xml:space="preserve"
y="55" y="120"
> >
AB AB
</text> </text>
@ -165,9 +150,9 @@ exports[`use various parts of svg-edit > check tool_bold #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -180,9 +165,9 @@ exports[`use various parts of svg-edit > check tool_bold #0`] = `
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="66" x="120"
xml:space="preserve" xml:space="preserve"
y="55" y="120"
> >
AB AB
</text> </text>
@ -212,9 +197,9 @@ exports[`use various parts of svg-edit > check tool_text_change_x_y_coordinate #
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -226,9 +211,9 @@ exports[`use various parts of svg-edit > check tool_text_change_x_y_coordinate #
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
x="91" x="145"
xml:space="preserve" xml:space="preserve"
y="80" y="145"
> >
AB AB
</text> </text>
@ -257,9 +242,9 @@ exports[`use various parts of svg-edit > check tool_text_change_font_size #0`] =
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -272,9 +257,9 @@ exports[`use various parts of svg-edit > check tool_text_change_font_size #0`] =
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="91" x="145"
xml:space="preserve" xml:space="preserve"
y="80" y="145"
> >
AB AB
</text> </text>
@ -302,9 +287,9 @@ exports[`use various parts of svg-edit > check tool_text_change_stroke_width #0`
id="svg_1" id="svg_1"
stroke="#000000" stroke="#000000"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -317,9 +302,9 @@ exports[`use various parts of svg-edit > check tool_text_change_stroke_width #0`
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="91" x="145"
xml:space="preserve" xml:space="preserve"
y="80" y="145"
> >
AB AB
</text> </text>
@ -347,9 +332,9 @@ exports[`use various parts of svg-edit > check tool_text_change_stoke_fill_color
id="svg_1" id="svg_1"
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -362,55 +347,9 @@ exports[`use various parts of svg-edit > check tool_text_change_stoke_fill_color
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="91" x="145"
xml:space="preserve" xml:space="preserve"
y="80" y="145"
>
AB
</text>
</g>
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_text_change_rotation #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"
stroke="#0000bf"
text-anchor="middle"
transform="matrix(1 0 0 1 0 0)"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
<text
fill="#000000"
font-family="Serif"
font-size="24"
id="svg_2"
stroke="#000000"
stroke-width="0"
text-anchor="middle"
transform="rotate(25 91 72)"
x="91"
xml:space="preserve"
y="80"
> >
AB AB
</text> </text>
@ -439,9 +378,9 @@ exports[`use various parts of svg-edit > check tool_text_change_blur #0`] = `
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -454,10 +393,9 @@ exports[`use various parts of svg-edit > check tool_text_change_blur #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="rotate(25 91 72)" x="145"
x="91"
xml:space="preserve" xml:space="preserve"
y="80" y="145"
> >
AB AB
</text> </text>
@ -491,9 +429,9 @@ exports[`use various parts of svg-edit > check tool_text_change_opacity #0`] = `
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -507,10 +445,9 @@ exports[`use various parts of svg-edit > check tool_text_change_opacity #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="rotate(25 91 72)" x="145"
x="91"
xml:space="preserve" xml:space="preserve"
y="80" y="145"
> >
AB AB
</text> </text>
@ -544,9 +481,9 @@ exports[`use various parts of svg-edit > check tool_text_align_to_page #0`] = `
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -560,10 +497,9 @@ exports[`use various parts of svg-edit > check tool_text_align_to_page #0`] = `
stroke="#000000" stroke="#000000"
stroke-width="0" stroke-width="0"
text-anchor="middle" text-anchor="middle"
transform="rotate(25 91 72)" x="145"
x="91"
xml:space="preserve" xml:space="preserve"
y="80" y="145"
> >
AB AB
</text> </text>
@ -597,9 +533,9 @@ exports[`use various parts of svg-edit > check tool_text_delete #0`] = `
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
transform="matrix(1 0 0 1 0 0)" transform="matrix(1 0 0 1 0 0)"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -627,9 +563,9 @@ exports[`use various parts of svg-edit > check tool_text_change_font_family #0`]
id="svg_1" id="svg_1"
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -658,9 +594,9 @@ exports[`use various parts of svg-edit > check tool_text_decoration_underline #0
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
text-decoration="underline" text-decoration="underline"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -689,9 +625,9 @@ exports[`use various parts of svg-edit > check tool_text_decoration_linethrough
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
text-decoration="underline line-through" text-decoration="underline line-through"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -720,9 +656,9 @@ exports[`use various parts of svg-edit > check tool_text_decoration_overline #0`
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
text-decoration="underline line-through overline" text-decoration="underline line-through overline"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -752,9 +688,9 @@ exports[`use various parts of svg-edit > check tool_letter_spacing #0`] = `
stroke="#0000bf" stroke="#0000bf"
text-anchor="middle" text-anchor="middle"
text-decoration="underline line-through overline" text-decoration="underline line-through overline"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -785,9 +721,9 @@ exports[`use various parts of svg-edit > check tool_word_spacing #0`] = `
text-anchor="middle" text-anchor="middle"
text-decoration="underline line-through overline" text-decoration="underline line-through overline"
word-spacing="15" word-spacing="15"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -819,9 +755,9 @@ exports[`use various parts of svg-edit > check tool_text_length #0`] = `
text-decoration="underline line-through overline" text-decoration="underline line-through overline"
textLength="20" textLength="20"
word-spacing="15" word-spacing="15"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>
@ -854,9 +790,9 @@ exports[`use various parts of svg-edit > check tool_length_adjust #0`] = `
text-decoration="underline line-through overline" text-decoration="underline line-through overline"
textLength="20" textLength="20"
word-spacing="15" word-spacing="15"
x="46" x="100"
xml:space="preserve" xml:space="preserve"
y="35" y="100"
> >
AB AB
</text> </text>

View File

@ -24,7 +24,7 @@ exports[`use all parts of svg-edit > check tool_shape #0`] = `
<g class="layer"> <g class="layer">
<title>Layer 1</title> <title>Layer 1</title>
<path <path
d="m208.99747,203.82033c4.11769,-11.81303 20.25091,0 0,15.18818c-20.25091,-15.18818 -4.11769,-27.00122 0,-15.18818z" d="m209,203.82c4.12,-11.81 20.25,0 0,15.19c-20.25,-15.19 -4.12,-27 0,-15.19z"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
stroke="#000000" stroke="#000000"
@ -47,7 +47,7 @@ exports[`use all parts of svg-edit > check tool_image #0`] = `
<g class="layer"> <g class="layer">
<title>Layer 1</title> <title>Layer 1</title>
<path <path
d="m208.99747,203.82033c4.11769,-11.81303 20.25091,0 0,15.18818c-20.25091,-15.18818 -4.11769,-27.00122 0,-15.18818z" d="m209,203.82c4.12,-11.81 20.25,0 0,15.19c-20.25,-15.19 -4.12,-27 0,-15.19z"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
stroke="#000000" stroke="#000000"

View File

@ -29,7 +29,7 @@ exports[`use all parts of svg-edit > check tool_circle #0`] = `
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
opacity="0.5" opacity="0.5"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
> >
<animate <animate
@ -60,7 +60,7 @@ exports[`use all parts of svg-edit > check tool_fhellipse #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -101,7 +101,7 @@ exports[`use all parts of svg-edit > check tool_ellipse #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -151,7 +151,7 @@ exports[`use all parts of svg-edit > check tool_circle_change_fill_color #0`] =
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -193,7 +193,7 @@ exports[`use all parts of svg-edit > check tool_circle_change_opacity #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -236,7 +236,7 @@ exports[`use all parts of svg-edit > check tool_ellipse_change_rotation #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -280,7 +280,7 @@ exports[`use all parts of svg-edit > check tool_ellipse_change_blur #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -330,7 +330,7 @@ exports[`use all parts of svg-edit > check tool_ellipse_change_cx_cy_coordinate
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -380,7 +380,7 @@ exports[`use all parts of svg-edit > check tool_ellipse_change_rx_ry_radius #0`]
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -440,7 +440,7 @@ exports[`use all parts of svg-edit > check tool_ellipse_bring_to_back #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -479,7 +479,7 @@ exports[`use all parts of svg-edit > check tool_ellipse_bring_to_front #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse
@ -528,7 +528,7 @@ exports[`use all parts of svg-edit > check tool_ellipse_clone #0`] = `
cy="150" cy="150"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
r="111.8034" r="111.8"
stroke="#000000" stroke="#000000"
></circle> ></circle>
<ellipse <ellipse

View File

@ -75,7 +75,7 @@ exports[`use all parts of svg-edit > check tool_path_change_seg_type #0`] = `
<g class="layer"> <g class="layer">
<title>Layer 1</title> <title>Layer 1</title>
<path <path
d="m75,75l75,25l-25,100c110.33333,130.33333 -33.33333,-83.33333 -50,-125z" d="m75,75l75,25l-25,100c110.33,130.33 -33.33,-83.33 -50,-125z"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
stroke="#000000" stroke="#000000"
@ -96,7 +96,7 @@ exports[`use all parts of svg-edit > check tool_path_change_clone_node #0`] = `
<g class="layer"> <g class="layer">
<title>Layer 1</title> <title>Layer 1</title>
<path <path
d="m201,246l-51,-146l-25,100c55.16667,65.16667 172.83333,215.33333 148.625,173c-24.20833,-42.33333 -64.29167,-106.16667 -72.625,-127z" d="m201,246l-51,-146l-25,100c55.17,65.17 172.83,215.33 148.63,173c-24.21,-42.33 -64.29,-106.17 -72.63,-127z"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
stroke="#000000" stroke="#000000"
@ -117,7 +117,7 @@ exports[`use all parts of svg-edit > check tool_path_openclose #0`] = `
<g class="layer"> <g class="layer">
<title>Layer 1</title> <title>Layer 1</title>
<path <path
d="m201,246l-51,-146l-25,100c55.16667,65.16667 172.83333,215.33333 148.625,173c-24.20833,-42.33333 -64.29167,-106.16667 -72.625,-127z" d="m201,246l-51,-146l-25,100c55.17,65.17 172.83,215.33 148.63,173c-24.21,-42.33 -64.29,-106.17 -72.63,-127z"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
stroke="#000000" stroke="#000000"

View File

@ -26,7 +26,7 @@ exports[`use all parts of svg-edit > check tool_polygon #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -62,7 +62,7 @@ exports[`use all parts of svg-edit > check tool_polygon_clone #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -75,7 +75,7 @@ exports[`use all parts of svg-edit > check tool_polygon_clone #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_2" id="svg_2"
orient="x" orient="x"
@ -103,7 +103,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_rotation #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -117,7 +117,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_rotation #0`] = `
class="svg_2_class" class="svg_2_class"
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_2_id" id="svg_2_id"
orient="x" orient="x"
@ -126,7 +126,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_rotation #0`] = `
sides="5" sides="5"
stroke="#000000" stroke="#000000"
stroke-width="5" stroke-width="5"
transform="rotate(25 350.145 270)" transform="rotate(25 350 270)"
></polygon> ></polygon>
</g> </g>
</svg> </svg>
@ -146,7 +146,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_blur #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -160,7 +160,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_blur #0`] = `
class="svg_2_class" class="svg_2_class"
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
filter="url(#svg_2_id_blur)" filter="url(#svg_2_id_blur)"
id="svg_2_id" id="svg_2_id"
@ -195,7 +195,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_opacity #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -209,7 +209,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_opacity #0`] = `
class="svg_2_class" class="svg_2_class"
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
filter="url(#svg_2_id_blur)" filter="url(#svg_2_id_blur)"
id="svg_2_id" id="svg_2_id"
@ -246,7 +246,7 @@ exports[`use all parts of svg-edit > check tool_polygon_bring_to_back #0`] = `
class="svg_2_class" class="svg_2_class"
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
filter="url(#svg_2_id_blur)" filter="url(#svg_2_id_blur)"
id="svg_2_id" id="svg_2_id"
@ -262,7 +262,7 @@ exports[`use all parts of svg-edit > check tool_polygon_bring_to_back #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -295,7 +295,7 @@ exports[`use all parts of svg-edit > check tool_polygon_bring_to_front #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -309,7 +309,7 @@ exports[`use all parts of svg-edit > check tool_polygon_bring_to_front #0`] = `
class="svg_2_class" class="svg_2_class"
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
filter="url(#svg_2_id_blur)" filter="url(#svg_2_id_blur)"
id="svg_2_id" id="svg_2_id"
@ -345,7 +345,7 @@ exports[`use all parts of svg-edit > check tool_polygon_delete #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -373,7 +373,7 @@ exports[`use all parts of svg-edit > check tool_polygon_align_to_page #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -401,7 +401,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_stroke_width #0`]
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#FF0000" fill="#FF0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -429,7 +429,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_stoke_fill_color
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#bf0000" fill="#bf0000"
id="svg_1" id="svg_1"
orient="x" orient="x"
@ -457,7 +457,7 @@ exports[`use all parts of svg-edit > check tool_polygon_change_sides #0`] = `
<polygon <polygon
cx="325" cx="325"
cy="250" cy="250"
edge="63.33333" edge="63.33"
fill="#bf0000" fill="#bf0000"
id="svg_1" id="svg_1"
orient="x" orient="x"

View File

@ -31,8 +31,8 @@ exports[`use all parts of svg-edit > check tool_star #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -70,8 +70,8 @@ exports[`use all parts of svg-edit > check tool_star_clone #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -86,8 +86,8 @@ exports[`use all parts of svg-edit > check tool_star_clone #0`] = `
orient="point" orient="point"
point="5" point="5"
points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 " points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -117,8 +117,8 @@ exports[`use all parts of svg-edit > check tool_star_change_rotation #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -134,8 +134,8 @@ exports[`use all parts of svg-edit > check tool_star_change_rotation #0`] = `
orient="point" orient="point"
point="5" point="5"
points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 " points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -166,8 +166,8 @@ exports[`use all parts of svg-edit > check tool_star_change_blur #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -184,8 +184,8 @@ exports[`use all parts of svg-edit > check tool_star_change_blur #0`] = `
orient="point" orient="point"
point="5" point="5"
points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 " points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -221,8 +221,8 @@ exports[`use all parts of svg-edit > check tool_star_change_opacity #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -240,8 +240,8 @@ exports[`use all parts of svg-edit > check tool_star_change_opacity #0`] = `
orient="point" orient="point"
point="5" point="5"
points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 " points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -280,8 +280,8 @@ exports[`use all parts of svg-edit > check tool_star_bring_to_back #0`] = `
orient="point" orient="point"
point="5" point="5"
points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 " points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -297,8 +297,8 @@ exports[`use all parts of svg-edit > check tool_star_bring_to_back #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -333,8 +333,8 @@ exports[`use all parts of svg-edit > check tool_star_bring_to_front #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -352,8 +352,8 @@ exports[`use all parts of svg-edit > check tool_star_bring_to_front #0`] = `
orient="point" orient="point"
point="5" point="5"
points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 " points="320,103.33333587646484 333.0618896484375,152.0218505859375 383.4037780761719,149.39886474609375 341.13458251953125,176.86705017089844 359.1856689453125,223.93446350097656 320,192.22222900390625 280.8143310546875,223.93446350097656 298.86541748046875,176.86705017089844 256.5962371826172,149.39886474609375 306.9381103515625,152.0218505859375 320,103.33333587646484 333.0618896484375,152.0218505859375 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -389,8 +389,8 @@ exports[`use all parts of svg-edit > check tool_star_delete #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -420,8 +420,8 @@ exports[`use all parts of svg-edit > check tool_star_align_to_page #0`] = `
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -451,8 +451,8 @@ exports[`use all parts of svg-edit > check tool_star_change_stroke_width #0`] =
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -482,8 +482,8 @@ exports[`use all parts of svg-edit > check tool_star_change_stoke_fill_color #0`
orient="point" orient="point"
point="5" point="5"
points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 " points="300,83.33333333333333 313.0618944953883,132.02184456944562 363.40376775301024,129.39886704167017 321.13458925100343,156.86704431944327 339.18568348616486,203.93446629166317 300,172.22222222222223 260.81431651383514,203.93446629166317 278.86541074899657,156.86704431944327 236.59623224698976,129.39886704167017 286.9381055046117,132.02184456944562 300,83.33333333333333 313.0618944953883,132.02184456944562 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"
@ -513,8 +513,8 @@ exports[`use all parts of svg-edit > check tool_star_change_sides #0`] = `
orient="point" orient="point"
point="6" point="6"
points="301.8821476527623,70.14305132911319 312.99325876387337,117.56470902279233 359.61717457172483,103.47638466244652 324.1043698749845,136.80971799577986 359.6171745717249,170.14305132911318 312.9932587638734,156.0547269687674 301.8821476527623,203.47638466244655 290.7710365416512,156.0547269687674 244.1471207337997,170.14305132911323 279.65992543054006,136.80971799577986 244.1471207337997,103.47638466244652 290.7710365416512,117.56470902279233 301.8821476527623,70.14305132911319 312.9932587638734,117.56470902279233 " points="301.8821476527623,70.14305132911319 312.99325876387337,117.56470902279233 359.61717457172483,103.47638466244652 324.1043698749845,136.80971799577986 359.6171745717249,170.14305132911318 312.9932587638734,156.0547269687674 301.8821476527623,203.47638466244655 290.7710365416512,156.0547269687674 244.1471207337997,170.14305132911323 279.65992543054006,136.80971799577986 244.1471207337997,103.47638466244652 290.7710365416512,117.56470902279233 301.8821476527623,70.14305132911319 312.9932587638734,117.56470902279233 "
r="66.66667" r="66.67"
r2="22.22222" r2="22.22"
radialshift="0" radialshift="0"
shape="star" shape="star"
starradiusmultiplier="3" starradiusmultiplier="3"

View File

@ -53,9 +53,9 @@ describe('UI - Clipboard', function () {
cy.get('#svg_2').should('exist') cy.get('#svg_2').should('exist')
// Delete. // Delete.
cy.get('#svg_2').click().rightclick() cy.get('#svg_2').click({ force: true }).rightclick()
cy.get('#cmenu_canvas a[href="#delete"]').click({ force: true }) cy.get('#cmenu_canvas a[href="#delete"]').click({ force: true })
cy.get('#svg_1').click().rightclick() cy.get('#svg_1').click().rightclick({ force: true })
cy.get('#cmenu_canvas a[href="#delete"]').click({ force: true }) cy.get('#cmenu_canvas a[href="#delete"]').click({ force: true })
cy.get('#svg_1').should('not.exist') cy.get('#svg_1').should('not.exist')
cy.get('#svg_2').should('not.exist') cy.get('#svg_2').should('not.exist')

View File

@ -15,12 +15,14 @@ describe('Fix issue 726', function () {
.trigger('mousedown', 250, 250, { force: true }) .trigger('mousedown', 250, 250, { force: true })
.trigger('mousemove', 350, 350, { force: true }) .trigger('mousemove', 350, 350, { force: true })
.trigger('mouseup', { force: true }) .trigger('mouseup', { force: true })
cy.wait(300)
cy.get('#tool_rect') cy.get('#tool_rect')
.click({ force: true }) .click({ force: true })
cy.get('#svgcontent') cy.get('#svgcontent')
.trigger('mousedown', 10, 0, { force: true }) .trigger('mousedown', 10, 0, { force: true })
.trigger('mousemove', 100, 100, { force: true }) .trigger('mousemove', 100, 100, { force: true })
.trigger('mouseup', { force: true }) .trigger('mouseup', { force: true })
cy.wait(300)
cy.get('#tool_rect') cy.get('#tool_rect')
.click({ force: true }) .click({ force: true })
cy.get('#svgcontent') cy.get('#svgcontent')
@ -30,7 +32,7 @@ describe('Fix issue 726', function () {
cy.wait(300) cy.wait(300)
cy.get('#svg_3') cy.get('#svg_3')
.rightclick(0, 0, { force: true }) .rightclick(0, 0, { force: true })
cy.get('a:contains("Send Backward")').click() cy.get('a:contains("Send Backward")').click({ force: true })
cy.get('#svg_2').should(($div) => { cy.get('#svg_2').should(($div) => {
const id = $div[0].previousElementSibling.id const id = $div[0].previousElementSibling.id
assert.equal(id, 'svg_3') assert.equal(id, 'svg_3')

View File

@ -1,6 +1,6 @@
import { import {
visitAndApproveStorage visitAndApproveStorage
} from '../../support/ui-test-helper.js' } from '../../../support/ui-test-helper.js'
// See https://github.com/SVG-Edit/svgedit/issues/364 // See https://github.com/SVG-Edit/svgedit/issues/364
describe('Key commands', function () { describe('Key commands', function () {

View File

@ -19,24 +19,29 @@ describe('use various parts of svg-edit', function () {
cy.get('#tool_source_save').click({ force: true }) cy.get('#tool_source_save').click({ force: true })
testSnapshot() testSnapshot()
}) })
it('check tool_fhpath', function () {
cy.get('#tool_fhpath')
.click({ force: true })
cy.get('#svgcontent')
.trigger('mousemove', 200, 200, { force: true })
.trigger('mousedown', 200, 200, { force: true })
.trigger('mousemove', 20, 20, { force: true })
.trigger('mouseup', { force: true })
testSnapshot()
})
it('check tool_text', function () { it('check tool_text', function () {
cy.get('#tool_text') cy.get('#tool_text')
.click({ force: true }) .click({ force: true })
cy.get('#svgcontent') cy.get('#svgcontent')
.trigger('mousedown', 46, 35, { force: true }) .trigger('mousedown', 100, 100, { force: true })
.trigger('mouseup', { force: true }) .trigger('mouseup', { force: true })
// svgedit use the #text text field to capture the text // svgedit use the #text text field to capture the text
cy.get('#text').type('AB', { force: true }) cy.get('#text').type('AB', { force: true })
cy.get('#svg_1').should('exist')
})
// For an unknown reason, the position of the text is different on local test vs CI test
// As a workaround, weforce SVG source
it('force svg', function () {
cy.get('#tool_source').click({ force: true })
cy.get('#svg_source_textarea')
.type('{selectall}', { force: true })
.type(`<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="#000000" font-family="Serif" font-size="24" id="svg_1" stroke="#000000" stroke-width="0" text-anchor="middle" x="100" xml:space="preserve" y="100">AB</text>
</g>
</svg>`, { force: true, parseSpecialCharSequences: false })
cy.get('#tool_source_save').click({ force: true })
testSnapshot() testSnapshot()
}) })
@ -102,14 +107,6 @@ describe('use various parts of svg-edit', function () {
.find('#Ok').eq(0).click({ force: true }) .find('#Ok').eq(0).click({ force: true })
testSnapshot() testSnapshot()
}) })
it('check tool_text_change_rotation', function () {
cy.get('#svg_2').click({ force: true })
for (let n = 0; n < 5; n++) {
cy.get('#angle').shadow().find('elix-number-spin-box').eq(0).shadow().find('#upButton').eq(0)
.click({ force: true })
}
testSnapshot()
})
it('check tool_text_change_blur', function () { it('check tool_text_change_blur', function () {
cy.get('#svg_2').click({ force: true }) cy.get('#svg_2').click({ force: true })
for (let n = 0; n < 10; n++) { for (let n = 0; n < 10; n++) {
@ -210,4 +207,14 @@ describe('use various parts of svg-edit', function () {
cy.get('#tool_length_adjust').shadow().find('select').select(1) cy.get('#tool_length_adjust').shadow().find('select').select(1)
testSnapshot() testSnapshot()
}) })
it('check tool_text_change_rotation', function () {
cy.get('#svg_1').click({ force: true })
for (let n = 0; n < 5; n++) {
cy.get('#angle').shadow().find('elix-number-spin-box').eq(0).shadow().find('#upButton').eq(0)
.click({ force: true })
}
cy.get('#svg_1').should('have.attr', 'transform')
.and('match', /rotate\(25/)
// issue with testSnapshot()
})
}) })

View File

@ -3,6 +3,7 @@ export const approveStorage = () => {
} }
export const visitAndApproveStorage = () => { export const visitAndApproveStorage = () => {
cy.viewport(512, 512)
cy.visit('/instrumented/editor/index.html') cy.visit('/instrumented/editor/index.html')
approveStorage() approveStorage()
} }

335
package-lock.json generated
View File

@ -10,12 +10,11 @@
"license": "(MIT AND Apache-2.0 AND ISC AND LGPL-3.0-or-later AND X11)", "license": "(MIT AND Apache-2.0 AND ISC AND LGPL-3.0-or-later AND X11)",
"dependencies": { "dependencies": {
"@babel/polyfill": "7.12.1", "@babel/polyfill": "7.12.1",
"browser-fs-access": "0.24.0", "browser-fs-access": "0.25.0",
"canvg": "3.0.10", "core-js": "3.21.1",
"core-js": "3.21.0",
"elix": "15.0.1", "elix": "15.0.1",
"html2canvas": "1.4.1", "html2canvas": "1.4.1",
"i18next": "21.6.11", "i18next": "21.6.14",
"jspdf": "2.5.1", "jspdf": "2.5.1",
"pathseg": "1.2.1", "pathseg": "1.2.1",
"regenerator-runtime": "0.13.9", "regenerator-runtime": "0.13.9",
@ -23,25 +22,25 @@
"svg2pdf.js": "2.2.0" "svg2pdf.js": "2.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "7.17.2", "@babel/core": "7.17.5",
"@babel/preset-env": "7.16.11", "@babel/preset-env": "7.16.11",
"@babel/register": "7.17.0", "@babel/register": "7.17.0",
"@babel/runtime-corejs3": "7.17.2", "@babel/runtime-corejs3": "7.17.2",
"@cypress/code-coverage": "3.9.12", "@cypress/code-coverage": "3.9.12",
"@cypress/fiddle": "1.19.3", "@cypress/fiddle": "1.19.3",
"@rollup/plugin-babel": "5.3.0", "@rollup/plugin-babel": "5.3.1",
"@rollup/plugin-commonjs": "^18", "@rollup/plugin-commonjs": "^18",
"@rollup/plugin-dynamic-import-vars": "1.4.2", "@rollup/plugin-dynamic-import-vars": "1.4.2",
"@rollup/plugin-node-resolve": "13.1.3", "@rollup/plugin-node-resolve": "13.1.3",
"@rollup/plugin-replace": "3.0.1", "@rollup/plugin-replace": "4.0.0",
"@rollup/plugin-url": "6.1.0", "@rollup/plugin-url": "6.1.0",
"@web/dev-server": "0.1.29", "@web/dev-server": "0.1.30",
"@web/dev-server-rollup": "0.3.15", "@web/dev-server-rollup": "0.3.15",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1", "copyfiles": "2.4.1",
"core-js-bundle": "3.21.0", "core-js-bundle": "3.21.1",
"cp-cli": "2.0.0", "cp-cli": "2.0.0",
"cypress": "9.4.1", "cypress": "9.5.1",
"cypress-multi-reporters": "1.5.0", "cypress-multi-reporters": "1.5.0",
"cypress-plugin-snapshots": "1.4.4", "cypress-plugin-snapshots": "1.4.4",
"jamilih": "0.54.0", "jamilih": "0.54.0",
@ -56,7 +55,7 @@
"remark-cli": "10.0.1", "remark-cli": "10.0.1",
"remark-lint-ordered-list-marker-value": "3.1.1", "remark-lint-ordered-list-marker-value": "3.1.1",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"rollup": "2.67.2", "rollup": "2.70.0",
"rollup-plugin-copy": "3.4.0", "rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.2", "rollup-plugin-filesize": "9.1.2",
"rollup-plugin-html": "0.2.1", "rollup-plugin-html": "0.2.1",
@ -72,9 +71,9 @@
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
"version": "2.1.1", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.1.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz",
"integrity": "sha512-Aolwjd7HSC2PyY0fDj/wA/EimQT4HfEnFYNp5s9CQlrdhyvWTtvZ5YzrUPu6R6/1jKiUlxu8bUhkdSnKHNAHMA==", "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@jridgewell/trace-mapping": "^0.3.0" "@jridgewell/trace-mapping": "^0.3.0"
@ -105,20 +104,20 @@
} }
}, },
"node_modules/@babel/core": { "node_modules/@babel/core": {
"version": "7.17.2", "version": "7.17.5",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.2.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz",
"integrity": "sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==", "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.0.0", "@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.16.7", "@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0", "@babel/generator": "^7.17.3",
"@babel/helper-compilation-targets": "^7.16.7", "@babel/helper-compilation-targets": "^7.16.7",
"@babel/helper-module-transforms": "^7.16.7", "@babel/helper-module-transforms": "^7.16.7",
"@babel/helpers": "^7.17.2", "@babel/helpers": "^7.17.2",
"@babel/parser": "^7.17.0", "@babel/parser": "^7.17.3",
"@babel/template": "^7.16.7", "@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.0", "@babel/traverse": "^7.17.3",
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
"convert-source-map": "^1.7.0", "convert-source-map": "^1.7.0",
"debug": "^4.1.0", "debug": "^4.1.0",
@ -162,9 +161,9 @@
} }
}, },
"node_modules/@babel/generator": { "node_modules/@babel/generator": {
"version": "7.17.0", "version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz",
"integrity": "sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==", "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
@ -569,9 +568,9 @@
} }
}, },
"node_modules/@babel/parser": { "node_modules/@babel/parser": {
"version": "7.17.0", "version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz",
"integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==", "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==",
"dev": true, "dev": true,
"bin": { "bin": {
"parser": "bin/babel-parser.js" "parser": "bin/babel-parser.js"
@ -1798,9 +1797,9 @@
} }
}, },
"node_modules/@babel/runtime": { "node_modules/@babel/runtime": {
"version": "7.16.3", "version": "7.17.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz",
"integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==",
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
}, },
@ -1836,18 +1835,18 @@
} }
}, },
"node_modules/@babel/traverse": { "node_modules/@babel/traverse": {
"version": "7.17.0", "version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
"integrity": "sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==", "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.16.7", "@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0", "@babel/generator": "^7.17.3",
"@babel/helper-environment-visitor": "^7.16.7", "@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-function-name": "^7.16.7", "@babel/helper-function-name": "^7.16.7",
"@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-hoist-variables": "^7.16.7",
"@babel/helper-split-export-declaration": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7",
"@babel/parser": "^7.17.0", "@babel/parser": "^7.17.3",
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
"debug": "^4.1.0", "debug": "^4.1.0",
"globals": "^11.1.0" "globals": "^11.1.0"
@ -3625,9 +3624,9 @@
} }
}, },
"node_modules/@rollup/plugin-babel": { "node_modules/@rollup/plugin-babel": {
"version": "5.3.0", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
"integrity": "sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==", "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-module-imports": "^7.10.4", "@babel/helper-module-imports": "^7.10.4",
@ -3635,6 +3634,16 @@
}, },
"engines": { "engines": {
"node": ">= 10.0.0" "node": ">= 10.0.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0",
"@types/babel__core": "^7.1.9",
"rollup": "^1.20.0||^2.0.0"
},
"peerDependenciesMeta": {
"@types/babel__core": {
"optional": true
}
} }
}, },
"node_modules/@rollup/plugin-commonjs": { "node_modules/@rollup/plugin-commonjs": {
@ -3732,9 +3741,9 @@
} }
}, },
"node_modules/@rollup/plugin-replace": { "node_modules/@rollup/plugin-replace": {
"version": "3.0.1", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.1.tgz", "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz",
"integrity": "sha512-989J5oRzf3mm0pO/0djTijdfEh9U3n63BIXN5X7T4U9BP+fN4oxQ6DvDuBvFaHA6scaHQRclqmKQEkBhB7k7Hg==", "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@rollup/pluginutils": "^3.1.0", "@rollup/pluginutils": "^3.1.0",
@ -4148,7 +4157,8 @@
"node_modules/@types/raf": { "node_modules/@types/raf": {
"version": "3.4.0", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.0.tgz", "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.0.tgz",
"integrity": "sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw==" "integrity": "sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw==",
"optional": true
}, },
"node_modules/@types/range-parser": { "node_modules/@types/range-parser": {
"version": "1.2.4", "version": "1.2.4",
@ -4265,9 +4275,9 @@
} }
}, },
"node_modules/@web/dev-server": { "node_modules/@web/dev-server": {
"version": "0.1.29", "version": "0.1.30",
"resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.29.tgz", "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.30.tgz",
"integrity": "sha512-oDz6vC9JEDZd4ZTno+SV57zCpsQl9v5LOkGuWGyei5gx5xu8NVDvh2IgTugz6DhZnffsSE6Zi0ubs+AhonLnGA==", "integrity": "sha512-nUKR+lq06gaCvH6vKmfhPe/Kka1Xp7yN1FN5NEx+Yk4+9CyxZ3UJt2eHXedrcz+XCafxExW114ElEDgCahJowg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.12.11", "@babel/code-frame": "^7.12.11",
@ -5580,9 +5590,9 @@
} }
}, },
"node_modules/browser-fs-access": { "node_modules/browser-fs-access": {
"version": "0.24.0", "version": "0.25.0",
"resolved": "https://registry.npmjs.org/browser-fs-access/-/browser-fs-access-0.24.0.tgz", "resolved": "https://registry.npmjs.org/browser-fs-access/-/browser-fs-access-0.25.0.tgz",
"integrity": "sha512-dW4kAA/sCy1ewJrHiz39j4TJmPuMcaY3VtyFBkKDftvYAPV21eYb/3BMeRrtmg7upApj1JLWHBqWc7jBy4xHPQ==" "integrity": "sha512-ovMv4bO/+dPXTqpBpzvrW3N66oJhhNkGZZpE+1vZhQDWmU0FOTc2lD2T0AOuaFOSV0LV71j4+UFnYE1RW2XY2Q=="
}, },
"node_modules/browser-pack": { "node_modules/browser-pack": {
"version": "6.1.0", "version": "6.1.0",
@ -6108,24 +6118,6 @@
"url": "https://opencollective.com/browserslist" "url": "https://opencollective.com/browserslist"
} }
}, },
"node_modules/canvg": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
"integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@types/raf": "^3.4.0",
"core-js": "^3.8.3",
"raf": "^3.4.1",
"regenerator-runtime": "^0.13.7",
"rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0",
"svg-pathdata": "^6.0.3"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/caseless": { "node_modules/caseless": {
"version": "0.12.0", "version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
@ -6855,9 +6847,9 @@
} }
}, },
"node_modules/core-js": { "node_modules/core-js": {
"version": "3.21.0", "version": "3.21.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz",
"integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==", "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==",
"hasInstallScript": true, "hasInstallScript": true,
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
@ -6865,9 +6857,9 @@
} }
}, },
"node_modules/core-js-bundle": { "node_modules/core-js-bundle": {
"version": "3.21.0", "version": "3.21.1",
"resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.21.0.tgz", "resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.21.1.tgz",
"integrity": "sha512-PZFY1YYb69qSWETyJuoN0L3hhWQKjxXARS8rE6hqSGHutARf/CcAMV9Z/1ebNXN9daAio+csSSjNeC8qo95DcQ==", "integrity": "sha512-4Gjo/bE+NxIBMsoFzuo4u8QjA531kKaorC7L1DiUlvM3ny4pj/0vIz9y1BZUWmFP6KHaEsUNFLWWLUa9EwN/2Q==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"funding": { "funding": {
@ -7248,9 +7240,9 @@
"dev": true "dev": true
}, },
"node_modules/cypress": { "node_modules/cypress": {
"version": "9.4.1", "version": "9.5.1",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-9.4.1.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.5.1.tgz",
"integrity": "sha512-+JgMG9uT+QFx97JU9kOHE3jO3+0UdkQ9H1oCBiC7A74qme7Jkdy2sYDBCPjjGczutnWnGUTMRlwiNMP/Uq6LrQ==", "integrity": "sha512-H7lUWB3Svr44gz1rNnj941xmdsCljXoJa2cDneAltjI9leKLMQLm30x6jLlpQ730tiVtIbW5HdUmBzPzwzfUQg==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
@ -10600,9 +10592,9 @@
} }
}, },
"node_modules/i18next": { "node_modules/i18next": {
"version": "21.6.11", "version": "21.6.14",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-21.6.11.tgz", "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.6.14.tgz",
"integrity": "sha512-tJ2+o0lVO+fhi8bPkCpBAeY1SgkqmQm5NzgPWCQssBrywJw98/o+Kombhty5nxQOpHtvMmsxcOopczUiH6bJxQ==", "integrity": "sha512-XL6WyD+xlwQwbieXRlXhKWoLb/rkch50/rA+vl6untHnJ+aYnkQ0YDZciTWE78PPhOpbi2gR0LTJCJpiAhA+uQ==",
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@ -10618,7 +10610,7 @@
} }
], ],
"dependencies": { "dependencies": {
"@babel/runtime": "^7.12.0" "@babel/runtime": "^7.17.2"
} }
}, },
"node_modules/iconv-lite": { "node_modules/iconv-lite": {
@ -11942,6 +11934,25 @@
"html2canvas": "^1.0.0-rc.5" "html2canvas": "^1.0.0-rc.5"
} }
}, },
"node_modules/jspdf/node_modules/canvg": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
"integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
"optional": true,
"dependencies": {
"@babel/runtime": "^7.12.5",
"@types/raf": "^3.4.0",
"core-js": "^3.8.3",
"raf": "^3.4.1",
"regenerator-runtime": "^0.13.7",
"rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0",
"svg-pathdata": "^6.0.3"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/jsprim": { "node_modules/jsprim": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
@ -16618,7 +16629,8 @@
"node_modules/performance-now": { "node_modules/performance-now": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"devOptional": true
}, },
"node_modules/phin": { "node_modules/phin": {
"version": "2.9.3", "version": "2.9.3",
@ -17087,6 +17099,7 @@
"version": "3.4.1", "version": "3.4.1",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"optional": true,
"dependencies": { "dependencies": {
"performance-now": "^2.1.0" "performance-now": "^2.1.0"
} }
@ -18482,6 +18495,7 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz", "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
"integrity": "sha1-1lBezbMEplldom+ktDMHMGd1lF0=", "integrity": "sha1-1lBezbMEplldom+ktDMHMGd1lF0=",
"optional": true,
"engines": { "engines": {
"node": ">= 0.8.15" "node": ">= 0.8.15"
} }
@ -18509,9 +18523,9 @@
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
"version": "2.67.2", "version": "2.70.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.2.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.0.tgz",
"integrity": "sha512-hoEiBWwZtf1QdK3jZIq59L0FJj4Fiv4RplCO4pvCRC86qsoFurWB4hKQIjoRf3WvJmk5UZ9b0y5ton+62fC7Tw==", "integrity": "sha512-iEzYw+syFxQ0X9RefVwhr8BA2TNJsTaX8L8dhyeyMECDbmiba+8UQzcu+xZdji0+JQ+s7kouQnw+9Oz5M19XKA==",
"bin": { "bin": {
"rollup": "dist/bin/rollup" "rollup": "dist/bin/rollup"
}, },
@ -19745,6 +19759,7 @@
"version": "2.5.0", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz", "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz",
"integrity": "sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ==", "integrity": "sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ==",
"optional": true,
"engines": { "engines": {
"node": ">=0.1.14" "node": ">=0.1.14"
} }
@ -20388,6 +20403,7 @@
"version": "6.0.3", "version": "6.0.3",
"resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz", "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
"integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==", "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
"optional": true,
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=12.0.0"
} }
@ -23251,9 +23267,9 @@
}, },
"dependencies": { "dependencies": {
"@ampproject/remapping": { "@ampproject/remapping": {
"version": "2.1.1", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.1.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz",
"integrity": "sha512-Aolwjd7HSC2PyY0fDj/wA/EimQT4HfEnFYNp5s9CQlrdhyvWTtvZ5YzrUPu6R6/1jKiUlxu8bUhkdSnKHNAHMA==", "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@jridgewell/trace-mapping": "^0.3.0" "@jridgewell/trace-mapping": "^0.3.0"
@ -23275,20 +23291,20 @@
"dev": true "dev": true
}, },
"@babel/core": { "@babel/core": {
"version": "7.17.2", "version": "7.17.5",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.2.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz",
"integrity": "sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==", "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@ampproject/remapping": "^2.0.0", "@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.16.7", "@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0", "@babel/generator": "^7.17.3",
"@babel/helper-compilation-targets": "^7.16.7", "@babel/helper-compilation-targets": "^7.16.7",
"@babel/helper-module-transforms": "^7.16.7", "@babel/helper-module-transforms": "^7.16.7",
"@babel/helpers": "^7.17.2", "@babel/helpers": "^7.17.2",
"@babel/parser": "^7.17.0", "@babel/parser": "^7.17.3",
"@babel/template": "^7.16.7", "@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.0", "@babel/traverse": "^7.17.3",
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
"convert-source-map": "^1.7.0", "convert-source-map": "^1.7.0",
"debug": "^4.1.0", "debug": "^4.1.0",
@ -23321,9 +23337,9 @@
} }
}, },
"@babel/generator": { "@babel/generator": {
"version": "7.17.0", "version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz",
"integrity": "sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==", "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
@ -23628,9 +23644,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.17.0", "version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz",
"integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==", "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==",
"dev": true "dev": true
}, },
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
@ -24462,9 +24478,9 @@
} }
}, },
"@babel/runtime": { "@babel/runtime": {
"version": "7.16.3", "version": "7.17.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz",
"integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==",
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
} }
@ -24491,18 +24507,18 @@
} }
}, },
"@babel/traverse": { "@babel/traverse": {
"version": "7.17.0", "version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
"integrity": "sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==", "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.16.7", "@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0", "@babel/generator": "^7.17.3",
"@babel/helper-environment-visitor": "^7.16.7", "@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-function-name": "^7.16.7", "@babel/helper-function-name": "^7.16.7",
"@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-hoist-variables": "^7.16.7",
"@babel/helper-split-export-declaration": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7",
"@babel/parser": "^7.17.0", "@babel/parser": "^7.17.3",
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
"debug": "^4.1.0", "debug": "^4.1.0",
"globals": "^11.1.0" "globals": "^11.1.0"
@ -26036,9 +26052,9 @@
"dev": true "dev": true
}, },
"@rollup/plugin-babel": { "@rollup/plugin-babel": {
"version": "5.3.0", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
"integrity": "sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==", "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-module-imports": "^7.10.4", "@babel/helper-module-imports": "^7.10.4",
@ -26123,9 +26139,9 @@
} }
}, },
"@rollup/plugin-replace": { "@rollup/plugin-replace": {
"version": "3.0.1", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.1.tgz", "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz",
"integrity": "sha512-989J5oRzf3mm0pO/0djTijdfEh9U3n63BIXN5X7T4U9BP+fN4oxQ6DvDuBvFaHA6scaHQRclqmKQEkBhB7k7Hg==", "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==",
"dev": true, "dev": true,
"requires": { "requires": {
"@rollup/pluginutils": "^3.1.0", "@rollup/pluginutils": "^3.1.0",
@ -26514,7 +26530,8 @@
"@types/raf": { "@types/raf": {
"version": "3.4.0", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.0.tgz", "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.0.tgz",
"integrity": "sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw==" "integrity": "sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw==",
"optional": true
}, },
"@types/range-parser": { "@types/range-parser": {
"version": "1.2.4", "version": "1.2.4",
@ -26624,9 +26641,9 @@
} }
}, },
"@web/dev-server": { "@web/dev-server": {
"version": "0.1.29", "version": "0.1.30",
"resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.29.tgz", "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.30.tgz",
"integrity": "sha512-oDz6vC9JEDZd4ZTno+SV57zCpsQl9v5LOkGuWGyei5gx5xu8NVDvh2IgTugz6DhZnffsSE6Zi0ubs+AhonLnGA==", "integrity": "sha512-nUKR+lq06gaCvH6vKmfhPe/Kka1Xp7yN1FN5NEx+Yk4+9CyxZ3UJt2eHXedrcz+XCafxExW114ElEDgCahJowg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.12.11", "@babel/code-frame": "^7.12.11",
@ -27692,9 +27709,9 @@
} }
}, },
"browser-fs-access": { "browser-fs-access": {
"version": "0.24.0", "version": "0.25.0",
"resolved": "https://registry.npmjs.org/browser-fs-access/-/browser-fs-access-0.24.0.tgz", "resolved": "https://registry.npmjs.org/browser-fs-access/-/browser-fs-access-0.25.0.tgz",
"integrity": "sha512-dW4kAA/sCy1ewJrHiz39j4TJmPuMcaY3VtyFBkKDftvYAPV21eYb/3BMeRrtmg7upApj1JLWHBqWc7jBy4xHPQ==" "integrity": "sha512-ovMv4bO/+dPXTqpBpzvrW3N66oJhhNkGZZpE+1vZhQDWmU0FOTc2lD2T0AOuaFOSV0LV71j4+UFnYE1RW2XY2Q=="
}, },
"browser-pack": { "browser-pack": {
"version": "6.1.0", "version": "6.1.0",
@ -28132,21 +28149,6 @@
"integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA==", "integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA==",
"dev": true "dev": true
}, },
"canvg": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
"integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
"requires": {
"@babel/runtime": "^7.12.5",
"@types/raf": "^3.4.0",
"core-js": "^3.8.3",
"raf": "^3.4.1",
"regenerator-runtime": "^0.13.7",
"rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0",
"svg-pathdata": "^6.0.3"
}
},
"caseless": { "caseless": {
"version": "0.12.0", "version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
@ -28734,14 +28736,14 @@
} }
}, },
"core-js": { "core-js": {
"version": "3.21.0", "version": "3.21.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz",
"integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==" "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig=="
}, },
"core-js-bundle": { "core-js-bundle": {
"version": "3.21.0", "version": "3.21.1",
"resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.21.0.tgz", "resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.21.1.tgz",
"integrity": "sha512-PZFY1YYb69qSWETyJuoN0L3hhWQKjxXARS8rE6hqSGHutARf/CcAMV9Z/1ebNXN9daAio+csSSjNeC8qo95DcQ==", "integrity": "sha512-4Gjo/bE+NxIBMsoFzuo4u8QjA531kKaorC7L1DiUlvM3ny4pj/0vIz9y1BZUWmFP6KHaEsUNFLWWLUa9EwN/2Q==",
"dev": true "dev": true
}, },
"core-js-compat": { "core-js-compat": {
@ -29061,9 +29063,9 @@
} }
}, },
"cypress": { "cypress": {
"version": "9.4.1", "version": "9.5.1",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-9.4.1.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.5.1.tgz",
"integrity": "sha512-+JgMG9uT+QFx97JU9kOHE3jO3+0UdkQ9H1oCBiC7A74qme7Jkdy2sYDBCPjjGczutnWnGUTMRlwiNMP/Uq6LrQ==", "integrity": "sha512-H7lUWB3Svr44gz1rNnj941xmdsCljXoJa2cDneAltjI9leKLMQLm30x6jLlpQ730tiVtIbW5HdUmBzPzwzfUQg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@cypress/request": "^2.88.10", "@cypress/request": "^2.88.10",
@ -31747,11 +31749,11 @@
} }
}, },
"i18next": { "i18next": {
"version": "21.6.11", "version": "21.6.14",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-21.6.11.tgz", "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.6.14.tgz",
"integrity": "sha512-tJ2+o0lVO+fhi8bPkCpBAeY1SgkqmQm5NzgPWCQssBrywJw98/o+Kombhty5nxQOpHtvMmsxcOopczUiH6bJxQ==", "integrity": "sha512-XL6WyD+xlwQwbieXRlXhKWoLb/rkch50/rA+vl6untHnJ+aYnkQ0YDZciTWE78PPhOpbi2gR0LTJCJpiAhA+uQ==",
"requires": { "requires": {
"@babel/runtime": "^7.12.0" "@babel/runtime": "^7.17.2"
} }
}, },
"iconv-lite": { "iconv-lite": {
@ -32777,6 +32779,24 @@
"dompurify": "^2.2.0", "dompurify": "^2.2.0",
"fflate": "^0.4.8", "fflate": "^0.4.8",
"html2canvas": "^1.0.0-rc.5" "html2canvas": "^1.0.0-rc.5"
},
"dependencies": {
"canvg": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
"integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
"optional": true,
"requires": {
"@babel/runtime": "^7.12.5",
"@types/raf": "^3.4.0",
"core-js": "^3.8.3",
"raf": "^3.4.1",
"regenerator-runtime": "^0.13.7",
"rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0",
"svg-pathdata": "^6.0.3"
}
}
} }
}, },
"jsprim": { "jsprim": {
@ -36289,7 +36309,8 @@
"performance-now": { "performance-now": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"devOptional": true
}, },
"phin": { "phin": {
"version": "2.9.3", "version": "2.9.3",
@ -36655,6 +36676,7 @@
"version": "3.4.1", "version": "3.4.1",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"optional": true,
"requires": { "requires": {
"performance-now": "^2.1.0" "performance-now": "^2.1.0"
} }
@ -37670,7 +37692,8 @@
"rgbcolor": { "rgbcolor": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz", "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
"integrity": "sha1-1lBezbMEplldom+ktDMHMGd1lF0=" "integrity": "sha1-1lBezbMEplldom+ktDMHMGd1lF0=",
"optional": true
}, },
"rimraf": { "rimraf": {
"version": "3.0.2", "version": "3.0.2",
@ -37692,9 +37715,9 @@
} }
}, },
"rollup": { "rollup": {
"version": "2.67.2", "version": "2.70.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.2.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.0.tgz",
"integrity": "sha512-hoEiBWwZtf1QdK3jZIq59L0FJj4Fiv4RplCO4pvCRC86qsoFurWB4hKQIjoRf3WvJmk5UZ9b0y5ton+62fC7Tw==", "integrity": "sha512-iEzYw+syFxQ0X9RefVwhr8BA2TNJsTaX8L8dhyeyMECDbmiba+8UQzcu+xZdji0+JQ+s7kouQnw+9Oz5M19XKA==",
"requires": { "requires": {
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
}, },
@ -38771,7 +38794,8 @@
"stackblur-canvas": { "stackblur-canvas": {
"version": "2.5.0", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz", "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz",
"integrity": "sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ==" "integrity": "sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ==",
"optional": true
}, },
"standard": { "standard": {
"version": "16.0.4", "version": "16.0.4",
@ -39241,7 +39265,8 @@
"svg-pathdata": { "svg-pathdata": {
"version": "6.0.3", "version": "6.0.3",
"resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz", "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
"integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==" "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
"optional": true
}, },
"svg2pdf.js": { "svg2pdf.js": {
"version": "2.2.0", "version": "2.2.0",

View File

@ -25,8 +25,6 @@
"cypress:run": "rimraf \".nyc_output/*\" && cypress run -q && nyc report --reporter=text-summary", "cypress:run": "rimraf \".nyc_output/*\" && cypress run -q && nyc report --reporter=text-summary",
"cypress:instrument": "rimraf instrumented && cp-cli src instrumented && nyc instrument --compact=false src instrumented", "cypress:instrument": "rimraf instrumented && cp-cli src instrumented && nyc instrument --compact=false src instrumented",
"cypress:test": "start-server-and-test start:test http://localhost:8000/instrumented/editor/index.html cypress:run", "cypress:test": "start-server-and-test start:test http://localhost:8000/instrumented/editor/index.html cypress:run",
"start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
"start-embedded": "run-p start start-allow-origin",
"open-docs-no-start": "open-cli http://localhost:8000/docs/jsdoc/", "open-docs-no-start": "open-cli http://localhost:8000/docs/jsdoc/",
"open-docs": "run-p start open-docs-no-start", "open-docs": "run-p start open-docs-no-start",
"build-docs-remove": "rimraf \"docs/jsdoc/*\"", "build-docs-remove": "rimraf \"docs/jsdoc/*\"",
@ -82,12 +80,11 @@
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "7.12.1", "@babel/polyfill": "7.12.1",
"browser-fs-access": "0.24.0", "browser-fs-access": "0.25.0",
"canvg": "3.0.10", "core-js": "3.21.1",
"core-js": "3.21.0",
"elix": "15.0.1", "elix": "15.0.1",
"html2canvas": "1.4.1", "html2canvas": "1.4.1",
"i18next": "21.6.11", "i18next": "21.6.14",
"jspdf": "2.5.1", "jspdf": "2.5.1",
"pathseg": "1.2.1", "pathseg": "1.2.1",
"regenerator-runtime": "0.13.9", "regenerator-runtime": "0.13.9",
@ -95,25 +92,25 @@
"svg2pdf.js": "2.2.0" "svg2pdf.js": "2.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "7.17.2", "@babel/core": "7.17.5",
"@babel/preset-env": "7.16.11", "@babel/preset-env": "7.16.11",
"@babel/register": "7.17.0", "@babel/register": "7.17.0",
"@babel/runtime-corejs3": "7.17.2", "@babel/runtime-corejs3": "7.17.2",
"@cypress/code-coverage": "3.9.12", "@cypress/code-coverage": "3.9.12",
"@cypress/fiddle": "1.19.3", "@cypress/fiddle": "1.19.3",
"@rollup/plugin-babel": "5.3.0", "@rollup/plugin-babel": "5.3.1",
"@rollup/plugin-commonjs": "^18", "@rollup/plugin-commonjs": "^18",
"@rollup/plugin-dynamic-import-vars": "1.4.2", "@rollup/plugin-dynamic-import-vars": "1.4.2",
"@rollup/plugin-node-resolve": "13.1.3", "@rollup/plugin-node-resolve": "13.1.3",
"@rollup/plugin-replace": "3.0.1", "@rollup/plugin-replace": "4.0.0",
"@rollup/plugin-url": "6.1.0", "@rollup/plugin-url": "6.1.0",
"@web/dev-server": "0.1.29", "@web/dev-server": "0.1.30",
"@web/dev-server-rollup": "0.3.15", "@web/dev-server-rollup": "0.3.15",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1", "copyfiles": "2.4.1",
"core-js-bundle": "3.21.0", "core-js-bundle": "3.21.1",
"cp-cli": "2.0.0", "cp-cli": "2.0.0",
"cypress": "9.4.1", "cypress": "9.5.1",
"cypress-multi-reporters": "1.5.0", "cypress-multi-reporters": "1.5.0",
"cypress-plugin-snapshots": "1.4.4", "cypress-plugin-snapshots": "1.4.4",
"jamilih": "0.54.0", "jamilih": "0.54.0",
@ -128,7 +125,7 @@
"remark-cli": "10.0.1", "remark-cli": "10.0.1",
"remark-lint-ordered-list-marker-value": "3.1.1", "remark-lint-ordered-list-marker-value": "3.1.1",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"rollup": "2.67.2", "rollup": "2.70.0",
"rollup-plugin-copy": "3.4.0", "rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.2", "rollup-plugin-filesize": "9.1.2",
"rollup-plugin-html": "0.2.1", "rollup-plugin-html": "0.2.1",

View File

@ -1,4 +1,3 @@
/* eslint-disable node/no-unpublished-import */
/* eslint-env node */ /* eslint-env node */
// This rollup script is run by the command: // This rollup script is run by the command:
// 'npm run build' // 'npm run build'

View File

@ -577,6 +577,36 @@ class Editor extends EditorStartup {
) )
} }
/**
* @returns {void}
*/
elementRenamed (win, renameObj) {
this.svgCanvas.runExtensions(
'elementRenamed',
/** @type {module:svgcanvas.SvgCanvas#event:ext_elementRenamed} */ {
renameObj
}
)
}
/**
* @returns {void}
*/
afterClear (win) {
this.svgCanvas.runExtensions(
'afterClear'
)
}
/**
* @returns {void}
*/
beforeClear (win) {
this.svgCanvas.runExtensions(
'beforeClear'
)
}
/** /**
* @returns {void} * @returns {void}
*/ */

View File

@ -192,6 +192,11 @@ class EditorStartup {
) )
this.svgCanvas.bind('contextset', this.contextChanged.bind(this)) this.svgCanvas.bind('contextset', this.contextChanged.bind(this))
this.svgCanvas.bind('extension_added', this.extAdded.bind(this)) this.svgCanvas.bind('extension_added', this.extAdded.bind(this))
this.svgCanvas.bind('elementRenamed', this.elementRenamed.bind(this))
this.svgCanvas.bind('beforeClear', this.beforeClear.bind(this))
this.svgCanvas.bind('afterClear', this.afterClear.bind(this))
this.svgCanvas.textActions.setInputElem($id('text')) this.svgCanvas.textActions.setInputElem($id('text'))
this.setBackground(this.configObj.pref('bkgd_color'), this.configObj.pref('bkgd_url')) this.setBackground(this.configObj.pref('bkgd_color'), this.configObj.pref('bkgd_url'))
@ -592,7 +597,6 @@ class EditorStartup {
}) })
// run callbacks stored by this.ready // run callbacks stored by this.ready
await this.runCallbacks() await this.runCallbacks()
window.addEventListener('message', this.messageListener.bind(this))
} }
/** /**
@ -685,24 +689,6 @@ class EditorStartup {
console.error(err) console.error(err)
} }
} }
/**
* @param {PlainObject} info
* @param {any} info.data
* @param {string} info.origin
* @fires module:svgcanvas.SvgCanvas#event:message
* @returns {void}
*/
messageListener ({ data, origin }) {
const messageObj = { data, origin }
if (!this.extensionsAdded) {
this.messageQueue.push(messageObj)
} else {
// Extensions can handle messages at this stage with their own
// canvas `message` listeners
this.svgCanvas.call('message', messageObj)
}
}
} }
export default EditorStartup export default EditorStartup

View File

@ -1,4 +1,4 @@
/* globals seConfirm, seAlert */ /* globals seAlert */
import SvgCanvas from '../svgcanvas/svgcanvas.js' import SvgCanvas from '../svgcanvas/svgcanvas.js'
import { convertUnit, isValidUnit } from '../common/units.js' import { convertUnit, isValidUnit } from '../common/units.js'
import { isChrome } from '../common/browser.js' import { isChrome } from '../common/browser.js'
@ -21,26 +21,6 @@ class MainMenu {
this.exportWindowCt = 0 this.exportWindowCt = 0
} }
/**
* @fires module:svgcanvas.SvgCanvas#event:ext_onNewDocument
* @returns {void}
*/
async clickClear () {
const [x, y] = this.editor.configObj.curConfig.dimensions
const ok = await seConfirm(this.editor.i18next.t('notification.QwantToClear'))
if (ok === 'Cancel') {
return
}
this.editor.leftPanel.clickSelect()
this.editor.svgCanvas.clear()
this.editor.svgCanvas.setResolution(x, y)
this.editor.updateCanvas(true)
this.editor.zoomImage()
this.editor.layersPanel.populateLayers()
this.editor.topPanel.updateContextPanel()
this.editor.svgCanvas.runExtensions('onNewDocument')
}
/** /**
* *
* @returns {void} * @returns {void}

View File

@ -121,10 +121,7 @@ export default {
imgImport.addEventListener('change', importImage) imgImport.addEventListener('change', importImage)
// dropping a svg file will import it in the svg as well // dropping a svg file will import it in the svg as well
this.workarea.addEventListener('drop', importImage) this.workarea.addEventListener('drop', importImage)
/**
* @fires module:svgcanvas.SvgCanvas#event:ext_onNewDocument
* @returns {void}
*/
const clickClear = async function () { const clickClear = async function () {
const [x, y] = svgEditor.configObj.curConfig.dimensions const [x, y] = svgEditor.configObj.curConfig.dimensions
const ok = await seConfirm(svgEditor.i18next.t('notification.QwantToClear')) const ok = await seConfirm(svgEditor.i18next.t('notification.QwantToClear'))
@ -139,7 +136,6 @@ export default {
svgEditor.layersPanel.populateLayers() svgEditor.layersPanel.populateLayers()
svgEditor.topPanel.updateContextPanel() svgEditor.topPanel.updateContextPanel()
svgEditor.topPanel.updateTitle('untitled.svg') svgEditor.topPanel.updateTitle('untitled.svg')
svgEditor.svgCanvas.runExtensions('onNewDocument')
} }
/** /**
@ -203,7 +199,7 @@ export default {
// In the future, more options can be provided here // In the future, more options can be provided here
const saveOpts = { const saveOpts = {
images: svgEditor.configObj.pref('img_save'), images: svgEditor.configObj.pref('img_save'),
round_digits: 6 round_digits: 2
} }
// remove the selected outline before serializing // remove the selected outline before serializing
svgCanvas.clearSelection() svgCanvas.clearSelection()

View File

@ -118,11 +118,11 @@ class TopPanel {
} }
$id('stroke_width').value = gWidth === null ? '' : gWidth $id('stroke_width').value = gWidth === null ? '' : gWidth
this.editor.bottomPanel.updateColorpickers(true) this.editor.bottomPanel.updateColorpickers(false)
break break
} }
default: { default: {
this.editor.bottomPanel.updateColorpickers(true) this.editor.bottomPanel.updateColorpickers(false)
$id('stroke_width').value = $id('stroke_width').value =
this.selectedElement.getAttribute('stroke-width') || 1 this.selectedElement.getAttribute('stroke-width') || 1
@ -539,9 +539,11 @@ class TopPanel {
*/ */
changeRotationAngle (e) { changeRotationAngle (e) {
this.editor.svgCanvas.setRotationAngle(e.target.value) this.editor.svgCanvas.setRotationAngle(e.target.value)
;(Number.parseInt(e.target.value) === 0) if (Number.parseInt(e.target.value) === 0) {
? $id('tool_reorient').classList.add('disabled') $id('tool_reorient').classList.add('disabled')
: $id('tool_reorient').classList.remove('disabled') } else {
$id('tool_reorient').classList.remove('disabled')
}
} }
/** /**
@ -628,16 +630,7 @@ class TopPanel {
} }
} }
// if the user is changing the id, then de-select the element first this.editor.svgCanvas.changeSelectedAttribute(attr, val)
// change the ID, then re-select it with the new ID
if (attr === 'id') {
const elem = this.editor.selectedElement
this.editor.svgCanvas.clearSelection()
elem.id = val
this.editor.svgCanvas.addToSelection([elem], true)
} else {
this.editor.svgCanvas.changeSelectedAttribute(attr, val)
}
return true return true
} }

View File

@ -459,36 +459,28 @@ const alignSelectedElements = (type, relativeTo) => {
const deleteSelectedElements = () => { const deleteSelectedElements = () => {
const selectedElements = svgCanvas.getSelectedElements() const selectedElements = svgCanvas.getSelectedElements()
const batchCmd = new BatchCommand('Delete Elements') const batchCmd = new BatchCommand('Delete Elements')
const len = selectedElements.length
const selectedCopy = [] // selectedElements is being deleted const selectedCopy = [] // selectedElements is being deleted
for (let i = 0; i < len; ++i) { selectedElements.forEach(selected => {
const selected = selectedElements[i] if (selected) {
if (!selected) { let parent = selected.parentNode
break let t = selected
// this will unselect the element and remove the selectedOutline
svgCanvas.gettingSelectorManager().releaseSelector(t)
// Remove the path if present.
pathModule.removePath_(t.id)
// Get the parent if it's a single-child anchor
if (parent.tagName === 'a' && parent.childNodes.length === 1) {
t = parent
parent = parent.parentNode
}
const { nextSibling } = t
t.remove()
const elem = t
selectedCopy.push(selected) // for the copy
batchCmd.addSubCommand(new RemoveElementCommand(elem, nextSibling, parent))
} }
})
let parent = selected.parentNode
let t = selected
// this will unselect the element and remove the selectedOutline
svgCanvas.gettingSelectorManager().releaseSelector(t)
// Remove the path if present.
pathModule.removePath_(t.id)
// Get the parent if it's a single-child anchor
if (parent.tagName === 'a' && parent.childNodes.length === 1) {
t = parent
parent = parent.parentNode
}
const { nextSibling } = t
t.remove()
const elem = t
selectedCopy.push(selected) // for the copy
batchCmd.addSubCommand(new RemoveElementCommand(elem, nextSibling, parent))
}
svgCanvas.setEmptySelectedElements() svgCanvas.setEmptySelectedElements()
if (!batchCmd.isEmpty()) { if (!batchCmd.isEmpty()) {

View File

@ -214,8 +214,8 @@ const getMouseTargetMethod = (evt) => {
* @todo Consider: Should this return an array by default, so extension results aren't overwritten? * @todo Consider: Should this return an array by default, so extension results aren't overwritten?
* @todo Would be easier to document if passing in object with key of action and vars as value; could then define an interface which tied both together * @todo Would be easier to document if passing in object with key of action and vars as value; could then define an interface which tied both together
* @function module:svgcanvas.SvgCanvas#runExtensions * @function module:svgcanvas.SvgCanvas#runExtensions
* @param {"mouseDown"|"mouseMove"|"mouseUp"|"zoomChanged"|"IDsUpdated"|"canvasUpdated"|"toolButtonStateUpdate"|"selectedChanged"|"elementTransition"|"elementChanged"|"langReady"|"langChanged"|"addLangData"|"onNewDocument"|"workareaResized"} action * @param {"mouseDown"|"mouseMove"|"mouseUp"|"zoomChanged"|"IDsUpdated"|"canvasUpdated"|"toolButtonStateUpdate"|"selectedChanged"|"elementTransition"|"elementChanged"|"langReady"|"langChanged"|"addLangData"|"workareaResized"} action
* @param {module:svgcanvas.SvgCanvas#event:ext_mouseDown|module:svgcanvas.SvgCanvas#event:ext_mouseMove|module:svgcanvas.SvgCanvas#event:ext_mouseUp|module:svgcanvas.SvgCanvas#event:ext_zoomChanged|module:svgcanvas.SvgCanvas#event:ext_IDsUpdated|module:svgcanvas.SvgCanvas#event:ext_canvasUpdated|module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate|module:svgcanvas.SvgCanvas#event:ext_selectedChanged|module:svgcanvas.SvgCanvas#event:ext_elementTransition|module:svgcanvas.SvgCanvas#event:ext_elementChanged|module:svgcanvas.SvgCanvas#event:ext_langReady|module:svgcanvas.SvgCanvas#event:ext_langChanged|module:svgcanvas.SvgCanvas#event:ext_addLangData|module:svgcanvas.SvgCanvas#event:ext_onNewDocument|module:svgcanvas.SvgCanvas#event:ext_workareaResized|module:svgcanvas.ExtensionVarBuilder} [vars] * @param {module:svgcanvas.SvgCanvas#event:ext_mouseDown|module:svgcanvas.SvgCanvas#event:ext_mouseMove|module:svgcanvas.SvgCanvas#event:ext_mouseUp|module:svgcanvas.SvgCanvas#event:ext_zoomChanged|module:svgcanvas.SvgCanvas#event:ext_IDsUpdated|module:svgcanvas.SvgCanvas#event:ext_canvasUpdated|module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate|module:svgcanvas.SvgCanvas#event:ext_selectedChanged|module:svgcanvas.SvgCanvas#event:ext_elementTransition|module:svgcanvas.SvgCanvas#event:ext_elementChanged|module:svgcanvas.SvgCanvas#event:ext_langReady|module:svgcanvas.SvgCanvas#event:ext_langChanged|module:svgcanvas.SvgCanvas#event:ext_addLangData|module:svgcanvas.SvgCanvas#event:ext_workareaResized|module:svgcanvas.ExtensionVarBuilder} [vars]
* @param {boolean} [returnArray] * @param {boolean} [returnArray]
* @returns {GenericArray<module:svgcanvas.ExtensionStatus>|module:svgcanvas.ExtensionStatus|false} See {@tutorial ExtensionDocs} on the ExtensionStatus. * @returns {GenericArray<module:svgcanvas.ExtensionStatus>|module:svgcanvas.ExtensionStatus|false} See {@tutorial ExtensionDocs} on the ExtensionStatus.
*/ */
@ -422,7 +422,16 @@ const setRotationAngle = (val, preventUndo) => {
if (!preventUndo) { if (!preventUndo) {
// we need to undo it, then redo it so it can be undo-able! :) // we need to undo it, then redo it so it can be undo-able! :)
// TODO: figure out how to make changes to transform list undo-able cross-browser? // TODO: figure out how to make changes to transform list undo-able cross-browser?
const newTransform = elem.getAttribute('transform') let newTransform = elem.getAttribute('transform')
// new transform is something like: 'rotate(5 1.39625e-8 -11)'
// we round the x so it becomes 'rotate(5 0 -11)'
if (newTransform) {
const newTransformArray = newTransform.split(' ')
const round = (num) => Math.round(Number(num) + Number.EPSILON)
const x = round(newTransformArray[1])
newTransform = `${newTransformArray[0]} ${x} ${newTransformArray[2]}`
}
if (oldTransform) { if (oldTransform) {
elem.setAttribute('transform', oldTransform) elem.setAttribute('transform', oldTransform)
} else { } else {

View File

@ -596,7 +596,7 @@ const setSvgString = (xmlString, preventUndo) => {
svgCanvas.getSvgRoot().append(svgCanvas.selectorManager.selectorParentGroup) svgCanvas.getSvgRoot().append(svgCanvas.selectorManager.selectorParentGroup)
if (!preventUndo) svgCanvas.addCommandToHistory(batchCmd) if (!preventUndo) svgCanvas.addCommandToHistory(batchCmd)
svgCanvas.call('changed', [svgCanvas.getSvgContent()]) svgCanvas.call('sourcechanged', [svgCanvas.getSvgContent()])
} catch (e) { } catch (e) {
console.error(e) console.error(e)
return false return false

View File

@ -7,7 +7,6 @@
* @copyright 2010 Alexis Deveria, 2010 Pavol Rusnak, 2010 Jeff Schiller, 2021 OptimistikSAS * @copyright 2010 Alexis Deveria, 2010 Pavol Rusnak, 2010 Jeff Schiller, 2021 OptimistikSAS
* *
*/ */
import { Canvg as canvg } from 'canvg'
import 'pathseg' // SVGPathSeg Polyfill (see https://github.com/progers/pathseg) import 'pathseg' // SVGPathSeg Polyfill (see https://github.com/progers/pathseg)
import * as pathModule from './path.js' import * as pathModule from './path.js'
@ -121,7 +120,7 @@ class SvgCanvas {
const { pathActions } = pathModule const { pathActions } = pathModule
// initialize class variables // initialize class variables
this.saveOptions = { round_digits: 5 } // Object with save options this.saveOptions = { round_digits: 2 } // Object with save options
this.importIds = {} // Object with IDs for imported files, to see if one was already added this.importIds = {} // Object with IDs for imported files, to see if one was already added
this.extensions = {} // Object to contain all included extensions this.extensions = {} // Object to contain all included extensions
this.removedElements = {} // Map of deleted reference elements this.removedElements = {} // Map of deleted reference elements
@ -737,10 +736,6 @@ class SvgCanvas {
return refAttrs return refAttrs
} }
getcanvg () {
return canvg
}
setCanvas (key, value) { setCanvas (key, value) {
this[key] = value this[key] = value
} }
@ -836,10 +831,11 @@ class SvgCanvas {
/** /**
* Clears the current document. This is not an undoable action. * Clears the current document. This is not an undoable action.
* @function module:svgcanvas.SvgCanvas#clear * @function module:svgcanvas.SvgCanvas#clear
* @fires module:svgcanvas.SvgCanvas#event:cleared * @fires module:svgcanvas.SvgCanvas#event:beforeClear|afterClear
* @returns {void} * @returns {void}
*/ */
clear () { clear () {
this.call('beforeClear')
this.pathActions.clear() this.pathActions.clear()
this.clearSelection() this.clearSelection()
// clear the svgcontent node // clear the svgcontent node
@ -854,7 +850,7 @@ class SvgCanvas {
this.selectorManager.initGroup() this.selectorManager.initGroup()
// reset the rubber band box // reset the rubber band box
this.rubberBox = this.selectorManager.getRubberBandBox() this.rubberBox = this.selectorManager.getRubberBandBox()
this.call('cleared') this.call('afterClear')
} }
async addExtension (name, extInitFunc, { importLocale }) { async addExtension (name, extInitFunc, { importLocale }) {

View File

@ -135,17 +135,30 @@ export const ffClone = function (elem) {
* @param {Element[]} elems - The DOM elements to apply the change to * @param {Element[]} elems - The DOM elements to apply the change to
* @returns {void} * @returns {void}
*/ */
export const changeSelectedAttributeNoUndoMethod = function (attr, newValue, elems) { export const changeSelectedAttributeNoUndoMethod = (attr, newValue, elems) => {
if (attr === 'id') {
// if the user is changing the id, then de-select the element first
// change the ID, then re-select it with the new ID
// as this change can impact other extensions, a 'renamedElement' event is thrown
const elem = elems[0]
const oldId = elem.id
if (oldId !== newValue) {
svgCanvas.clearSelection()
elem.id = newValue
svgCanvas.addToSelection([elem], true)
svgCanvas.call('elementRenamed', { elem, oldId, newId: newValue })
}
return
}
const selectedElements = svgCanvas.getSelectedElements() const selectedElements = svgCanvas.getSelectedElements()
const zoom = svgCanvas.getZoom() const zoom = svgCanvas.getZoom()
if (svgCanvas.getCurrentMode() === 'pathedit') { if (svgCanvas.getCurrentMode() === 'pathedit') {
// Editing node // Editing node
svgCanvas.pathActions.moveNode(attr, newValue) svgCanvas.pathActions.moveNode(attr, newValue)
} }
elems = elems || selectedElements elems = elems ?? selectedElements
let i = elems.length let i = elems.length
const noXYElems = ['g', 'polyline', 'path'] const noXYElems = ['g', 'polyline', 'path']
// const goodGAttrs = ['transform', 'opacity', 'filter'];
while (i--) { while (i--) {
let elem = elems[i] let elem = elems[i]
@ -160,9 +173,6 @@ export const changeSelectedAttributeNoUndoMethod = function (attr, newValue, ele
continue continue
} }
// only allow the transform/opacity/filter attribute to change on <g> elements, slightly hacky
// TODO: Missing statement body
// if (elem.tagName === 'g' && goodGAttrs.includes(attr)) {}
let oldval = attr === '#text' ? elem.textContent : elem.getAttribute(attr) let oldval = attr === '#text' ? elem.textContent : elem.getAttribute(attr)
if (!oldval) { oldval = '' } if (!oldval) { oldval = '' }
if (oldval !== String(newValue)) { if (oldval !== String(newValue)) {
@ -176,18 +186,6 @@ export const changeSelectedAttributeNoUndoMethod = function (attr, newValue, ele
} }
// Hoped to solve the issue of moving text with text-anchor="start", // Hoped to solve the issue of moving text with text-anchor="start",
// but this doesn't actually fix it. Hopefully on the right track, though. -Fyrd // but this doesn't actually fix it. Hopefully on the right track, though. -Fyrd
// const box = getBBox(elem), left = box.x, top = box.y, {width, height} = box,
// dx = width - oldW, dy = 0;
// const angle = getRotationAngle(elem, true);
// if (angle) {
// const r = Math.sqrt(dx * dx + dy * dy);
// const theta = Math.atan2(dy, dx) - angle;
// dx = r * Math.cos(theta);
// dy = r * Math.sin(theta);
//
// elem.setAttribute('x', elem.getAttribute('x') - dx);
// elem.setAttribute('y', elem.getAttribute('y') - dy);
// }
} else if (attr === '#href') { } else if (attr === '#href') {
setHref(elem, newValue) setHref(elem, newValue)
} else if (newValue) { } else if (newValue) {
@ -206,10 +204,6 @@ export const changeSelectedAttributeNoUndoMethod = function (attr, newValue, ele
svgCanvas.textActions.toSelectMode(elem) svgCanvas.textActions.toSelectMode(elem)
} }
// if (i === 0) {
// selectedBBoxes[0] = utilsGetBBox(elem);
// }
// Use the Firefox ffClone hack for text elements with gradients or // Use the Firefox ffClone hack for text elements with gradients or
// where other text attributes are changed. // where other text attributes are changed.
if (isGecko() && if (isGecko() &&
@ -274,7 +268,6 @@ export const changeSelectedAttributeMethod = function (attr, val, elems) {
const selectedElements = svgCanvas.getSelectedElements() const selectedElements = svgCanvas.getSelectedElements()
elems = elems || selectedElements elems = elems || selectedElements
svgCanvas.undoMgr.beginUndoableChange(attr, elems) svgCanvas.undoMgr.beginUndoableChange(attr, elems)
// const i = elems.length;
changeSelectedAttributeNoUndoMethod(attr, val, elems) changeSelectedAttributeNoUndoMethod(attr, val, elems)