perf: improve new element drawing (#8340)

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Ryan Di
2024-08-23 20:27:57 +02:00
committed by GitHub
co-authored by dwelle
parent b5d7f5b4ba
commit 5e1ff7cafe
34 changed files with 749 additions and 495 deletions
@@ -1,8 +1,8 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > arrow 1`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > arrow 3`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > arrow 2`] = `
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > arrow 4`] = `
{
"angle": 0,
"backgroundColor": "transparent",
@@ -52,9 +52,9 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
}
`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > diamond 1`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > diamond 3`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > diamond 2`] = `
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > diamond 4`] = `
{
"angle": 0,
"backgroundColor": "transparent",
@@ -88,9 +88,9 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
}
`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > ellipse 1`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > ellipse 3`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > ellipse 2`] = `
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > ellipse 4`] = `
{
"angle": 0,
"backgroundColor": "transparent",
@@ -124,7 +124,7 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
}
`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > line 1`] = `
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > line 3`] = `
{
"angle": 0,
"backgroundColor": "transparent",
@@ -173,9 +173,9 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
}
`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > rectangle 1`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > rectangle 3`] = `1`;
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > rectangle 2`] = `
exports[`Test dragCreate > add element to the scene when pointer dragging long enough > rectangle 4`] = `
{
"angle": 0,
"backgroundColor": "transparent",