Fixes issue with xy panel (#935)

* update deps

* fixes #930

* update workflow

* Update TopPanel.js

* fix side effects

* Update utilities-performance.cy.js
This commit is contained in:
JFH
2023-12-09 17:17:10 +01:00
committed by GitHub
parent 94068b80b7
commit ec3e0522df
21 changed files with 1296 additions and 1172 deletions

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="330" cy="250" edge="63.75" fill="#FF0000" id="svg_1" orient="x" points="637.5,250 600.0264282226562,301.5779724121094 539.3928833007812,281.8769226074219 539.3928833007812,218.12306213378906 600.0264282226562,198.4220428466797 637.5,250 " shape="regularPoly" sides="5" stroke="#000000" stroke-width="5"/>
<polygon cx="330" cy="250" edge="63.75" fill="#FF0000" id="svg_1" orient="x" points="637.4922637939453,250 600.0186920166016,301.5779724121094 539.3851470947266,281.8769226074219 539.3851470947266,218.12306213378906 600.0186920166016,198.4220428466797 637.4922637939453,250 " shape="regularPoly" sides="5" stroke="#000000" stroke-width="5"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 506 B

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="330" cy="250" edge="63.75" fill="#bf0000" id="svg_1" orient="x" points="665.1679905202699,250 633.291057027713,305.21246839860237 569.5371900425995,305.21246839860237 537.6602565500426,250 569.5371900425994,194.78753160139763 633.291057027713,194.78753160139763 665.1679905202699,249.99999999999997 " shape="regularPoly" sides="6" stroke="#0000bf" stroke-width="15"/>
<polygon cx="330" cy="250" edge="63.75" fill="#bf0000" id="svg_1" orient="x" points="665.1602390554261,250 633.2833055628693,305.21246839860237 569.5294385777557,305.21246839860237 537.6525050851989,250 569.5294385777556,194.78753160139763 633.2833055628693,194.78753160139763 665.1602390554261,249.99999999999997 " shape="regularPoly" sides="6" stroke="#0000bf" stroke-width="15"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 547 B

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="330" cy="250" edge="63.75" fill="#bf0000" id="svg_1" orient="x" points="637.5,250 600.0264282226562,301.5779724121094 539.3928833007812,281.8769226074219 539.3928833007812,218.12306213378906 600.0264282226562,198.4220428466797 637.5,250 " shape="regularPoly" sides="5" stroke="#0000bf" stroke-width="15"/>
<polygon cx="330" cy="250" edge="63.75" fill="#bf0000" id="svg_1" orient="x" points="637.4922637939453,250 600.0186920166016,301.5779724121094 539.3851470947266,281.8769226074219 539.3851470947266,218.12306213378906 600.0186920166016,198.4220428466797 637.4922637939453,250 " shape="regularPoly" sides="5" stroke="#0000bf" stroke-width="15"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 507 B

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="330" cy="250" edge="63.75" fill="#FF0000" id="svg_1" orient="x" points="637.5,250 600.0264282226562,301.5779724121094 539.3928833007812,281.8769226074219 539.3928833007812,218.12306213378906 600.0264282226562,198.4220428466797 637.5,250 " shape="regularPoly" sides="5" stroke="#000000" stroke-width="15"/>
<polygon cx="330" cy="250" edge="63.75" fill="#FF0000" id="svg_1" orient="x" points="637.4922637939453,250 600.0186920166016,301.5779724121094 539.3851470947266,281.8769226074219 539.3851470947266,218.12306213378906 600.0186920166016,198.4220428466797 637.4922637939453,250 " shape="regularPoly" sides="5" stroke="#000000" stroke-width="15"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 507 B

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="300" cy="150" fill="#FF0000" id="svg_1" orient="point" point="5" points="573.7792053222656,83 586.9064025878906,131.9319610595703 637.5,129.29586791992188 595.0194702148438,156.90138244628906 613.1608276367188,204.20413208007812 573.7792053222656,172.3333282470703 534.3975830078125,204.20413208007812 552.5389404296875,156.90138244628906 510.0584259033203,129.29586791992188 560.6520080566406,131.9319610595703 573.7792053222656,83 586.9064025878906,131.9319610595703 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#000000" stroke-width="5"/>
<polygon cx="300" cy="150" fill="#FF0000" id="svg_1" orient="point" point="5" points="573.7799987792969,83 586.9071960449219,131.9319610595703 637.5007934570312,129.29586791992188 595.020263671875,156.90138244628906 613.16162109375,204.20413208007812 573.7799987792969,172.3333282470703 534.3983764648438,204.20413208007812 552.5397338867188,156.90138244628906 510.05921936035156,129.29586791992188 560.6528015136719,131.9319610595703 573.7799987792969,83 586.9071960449219,131.9319610595703 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#000000" stroke-width="5"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="300" cy="150" fill="#bf0000" id="svg_1" orient="point" point="6" points="575.6707502092634,69.74376460484095 586.83741687593,117.40253058698849 633.6944522628207,103.24376460484095 598.0040835425967,136.74376460484095 633.6944522628207,170.24376460484092 586.83741687593,156.0849986226934 575.6707502092634,203.74376460484095 564.5040835425967,156.0849986226934 517.647048155706,170.24376460484098 553.33741687593,136.74376460484095 517.647048155706,103.24376460484095 564.5040835425967,117.40253058698849 575.6707502092634,69.74376460484095 586.83741687593,117.40253058698849 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#0000bf" stroke-width="15"/>
<polygon cx="300" cy="150" fill="#bf0000" id="svg_1" orient="point" point="6" points="575.6715567452567,69.74376460484095 586.8382234119233,117.40253058698849 633.695258798814,103.24376460484095 598.00489007859,136.74376460484095 633.695258798814,170.24376460484092 586.8382234119233,156.0849986226934 575.6715567452567,203.74376460484095 564.50489007859,156.0849986226934 517.6478546916993,170.24376460484098 553.3382234119233,136.74376460484095 517.6478546916993,103.24376460484095 564.50489007859,117.40253058698849 575.6715567452567,69.74376460484095 586.8382234119233,117.40253058698849 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#0000bf" stroke-width="15"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 867 B

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="300" cy="150" fill="#bf0000" id="svg_1" orient="point" point="5" points="573.7792053222656,83 586.9064025878906,131.9319610595703 637.5,129.29586791992188 595.0194702148438,156.90138244628906 613.1608276367188,204.20413208007812 573.7792053222656,172.3333282470703 534.3975830078125,204.20413208007812 552.5389404296875,156.90138244628906 510.0584259033203,129.29586791992188 560.6520080566406,131.9319610595703 573.7792053222656,83 586.9064025878906,131.9319610595703 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#0000bf" stroke-width="15"/>
<polygon cx="300" cy="150" fill="#bf0000" id="svg_1" orient="point" point="5" points="573.7799987792969,83 586.9071960449219,131.9319610595703 637.5007934570312,129.29586791992188 595.020263671875,156.90138244628906 613.16162109375,204.20413208007812 573.7799987792969,172.3333282470703 534.3983764648438,204.20413208007812 552.5397338867188,156.90138244628906 510.05921936035156,129.29586791992188 560.6528015136719,131.9319610595703 573.7799987792969,83 586.9071960449219,131.9319610595703 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#0000bf" stroke-width="15"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 767 B

View File

@@ -1,7 +1,7 @@
<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>
<polygon cx="300" cy="150" fill="#FF0000" id="svg_1" orient="point" point="5" points="573.7792053222656,83 586.9064025878906,131.9319610595703 637.5,129.29586791992188 595.0194702148438,156.90138244628906 613.1608276367188,204.20413208007812 573.7792053222656,172.3333282470703 534.3975830078125,204.20413208007812 552.5389404296875,156.90138244628906 510.0584259033203,129.29586791992188 560.6520080566406,131.9319610595703 573.7792053222656,83 586.9064025878906,131.9319610595703 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#000000" stroke-width="15"/>
<polygon cx="300" cy="150" fill="#FF0000" id="svg_1" orient="point" point="5" points="573.7799987792969,83 586.9071960449219,131.9319610595703 637.5007934570312,129.29586791992188 595.020263671875,156.90138244628906 613.16162109375,204.20413208007812 573.7799987792969,172.3333282470703 534.3983764648438,204.20413208007812 552.5397338867188,156.90138244628906 510.05921936035156,129.29586791992188 560.6528015136719,131.9319610595703 573.7799987792969,83 586.9071960449219,131.9319610595703 " r="67" r2="22.33" radialshift="0" shape="star" starRadiusMultiplier="3" stroke="#000000" stroke-width="15"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 767 B

View File

@@ -5,6 +5,7 @@ import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
import * as math from '../../../packages/svgcanvas/core/math.js'
import * as path from '../../../packages/svgcanvas/core/path.js'
import setAssertionMethods from '../../support/assert-close.js'
import * as units from '../../../packages/svgcanvas/core/units.js'
// eslint-disable-next-line
chai.use(setAssertionMethods)
@@ -94,6 +95,7 @@ describe('utilities bbox', function () {
}
path.init(mockSvgCanvas)
units.init({ getRoundDigits: () => 2 }) // mock getRoundDigits
mockaddSVGElementsFromJsonCallCount = 0
})

View File

@@ -4,9 +4,11 @@ import 'pathseg'
import { NS } from '../../../packages/svgcanvas/core/namespaces.js'
import * as utilities from '../../../packages/svgcanvas/core/utilities.js'
import * as math from '../../../packages/svgcanvas/core/math.js'
import * as units from '../../../packages/svgcanvas/core/units.js'
describe('utilities performance', function () {
let currentLayer; let groupWithMatrixTransform; let textWithMatrixTransform
units.init({ getRoundDigits: () => 2 }) // mock getRoundDigits
beforeEach(() => {
document.body.textContent = ''
const style = document.createElement('style')