Skip to content

Conversation

@ryan-di
Copy link
Member

@ryan-di ryan-di commented Jun 19, 2024

  • update tests for linear elements
  • extend logic to multiple/group elements

close #8154

@vercel
Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Dec 18, 2024 7:21am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Dec 18, 2024 7:21am
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Dec 18, 2024 7:21am
1 Skipped Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Dec 18, 2024 7:21am

@github-actions
Copy link

github-actions bot commented Jun 24, 2024

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 66.91% (🎯 60%) 67029 / 100177
🟢 Statements 66.91% (🎯 60%) 67029 / 100177
🟢 Functions 63.93% (🎯 63%) 1948 / 3047
🟢 Branches 79.63% (🎯 70%) 8021 / 10072
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/excalidraw/actions/actionFlip.ts 100% 95.45% 100% 100%
packages/excalidraw/components/App.tsx 69.67% 76.56% 71.5% 69.67% 510-511, 623-632, 732-733, 751-752, 773-833, 836-842, 855-858, 861-937, 940-959, 962-967, 975-985, 987-988, 993-994, 998-1000, 1014, 1021-1286, 1346-1347, 1379-1381, 1388-1433, 1459, 1469, 1476-1479, 1488-1492, 1523-1524, 1609-1619, 1624-1639, 1643-1690, 1786-1791, 1820-1825, 1828-1858, 1866-1891, 1904-1995, 1998-2006, 2009-2068, 2071-2112, 2115-2120, 2155-2156, 2179-2180, 2212-2213, 2217-2218, 2238-2246, 2251-2264, 2270-2271, 2275, 2280-2288, 2290-2298, 2310, 2345-2346, 2359-2360, 2382-2383, 2390, 2411-2413, 2473-2475, 2478-2483, 2488-2489, 2529-2537, 2542-2551, 2595-2597, 2700-2701, 2705, 2708-2709, 2717-2720, 2729-2742, 2748-2751, 2754, 2756-2757, 2764-2765, 2771-2772, 2775-2776, 2787, 2789-2793, 2796-2797, 2800-2801, 2812-2820, 2825-2826, 2877-2878, 2892-2898, 2904-2912, 2916-2924, 2928-2929, 2932-2965, 2968-2980, 2991-2992, 3003-3004, 3021-3025, 3029-3032, 3039-3041, 3059-3066, 3069, 3071-3076, 3080-3082, 3128-3129, 3136-3138, 3140-3163, 3180-3212, 3227, 3233, 3290-3293, 3296-3297, 3314-3316, 3338-3339, 3345-3349, 3355-3436, 3490, 3494, 3529-3530, 3589, 3599-3617, 3620-3626, 3629-3630, 3636-3652, 3692-3717, 3800-3801, 3824-3838, 3846-3852, 3866-3867, 3873-3886, 3943-3944, 4016-4026, 4062, 4211-4212, 4214-4221, 4255-4259, 4261-4262, 4264-4267, 4288-4289, 4296-4297, 4319-4329, 4339-4341, 4343, 4424-4427, 4449-4457, 4461-4463, 4473-4474, 4476-4496, 4503-4526, 4529-4535, 4552-4555, 4570-4577, 4673-4677, 4681, 4686-4687, 4692-4696, 4729-4730, 4733-4734, 4746-4750, 4755-4756, 4762-4772, 4777-4804, 4809-4820, 4920-4921, 5005, 5030, 5056-5058, 5125-5126, 5144-5145, 5336-5337, 5340-5341, 5349-5350, 5405-5409, 5462-5469, 5471-5472, 5477-5543, 5587, 5644, 5671, 5678-5679, 5692-5695, 5726, 5779-5782, 5785-5789, 5791-5798, 5815-5824, 5827-5828, 5963-5964, 5967, 5969-5974, 5980-5982, 5984, 5993, 5995, 6017-6022, 6024-6027, 6031-6032, 6041-6057, 6059, 6061-6064, 6068-6164, 6168-6169, 6184-6185, 6221-6227, 6254-6255, 6267-6268, 6296, 6298-6328, 6335-6336, 6358-6359, 6378, 6380-6423, 6428-6429, 6431-6432, 6448-6449, 6455-6456, 6460-6463, 6466-6467, 6481-6507, 6515-6516, 6520-6523, 6525-6529, 6547-6551, 6598-6603, 6605-6607, 6623, 6625-6638, 6663-6666, 6721, 6738-6739, 6741-6764, 6779-6780, 6894-6922, 6977-6978, 7041-7042, 7058-7059, 7078-7079, 7173, 7179-7180, 7203-7222, 7231-7240, 7254, 7402-7440, 7444-7494, 7509, 7518, 7552-7558, 7585-7587, 7753-7756, 7778-7808, 7821, 7823-7831, 7845, 7847-7855, 7862-7865, 7873-7878, 7887-7888, 7913-7914, 7917-7919, 7922-7923, 7946-7947, 7953-7954, 7981-7982, 8065-8066, 8117-8130, 8134-8220, 8299-8302, 8328-8329, 8386, 8409-8415, 8426-8445, 8473-8479, 8511, 8553, 8559, 8574-8581, 8584-8591, 8646, 8724-8725, 8746-8748, 8751, 8765-8789, 8898-8911, 8934-8958, 8967-9006, 9019-9020, 9029-9036, 9054-9061, 9115-9120, 9129-9153, 9155-9156, 9230-9231, 9238, 9240-9276, 9305, 9364, 9403-9405, 9430-9435, 9437-9438, 9443-9445, 9448-9468, 9482-9483, 9489-9498, 9503, 9507-9511, 9520-9524, 9527-9532, 9536-9543, 9572, 9574-9578, 9580-9590, 9606-9608, 9619-9627, 9631-9675, 9678-9749, 9757, 9775-9782, 9784-9806, 9821-9843, 9862-9864, 9910-9911, 10023-10027, 10029-10045, 10047-10051, 10063-10064, 10074-10090, 10109-10128, 10130-10131, 10158-10159, 10163-10164, 10174, 10176-10179, 10181-10182, 10222, 10263-10264, 10274, 10316, 10334-10342, 10353-10358, 10368-10369, 10371-10442, 10465-10466, 10498-10501, 10595-10602, 10628-10629, 10677-10748, 10796-10797, 10806-10809, 10814-10815, 10836-10838, 10840-10844, 10882
packages/excalidraw/components/Stats/Dimension.tsx 45.95% 60.71% 100% 45.95% 52-150, 190-223, 242-244, 246-256
packages/excalidraw/components/Stats/MultiDimension.tsx 69.82% 81.25% 100% 69.82% 59, 82-102, 207, 219, 248, 253-348
packages/excalidraw/components/Stats/utils.ts 78.34% 92.3% 85.71% 78.34% 78-111, 125-126, 161-171
packages/excalidraw/element/resizeElements.ts 94.72% 81.03% 100% 94.72% 211, 225-231, 268-269, 320-321, 342-347, 350-351, 353-354, 357-359, 534-535, 554-563, 672, 768-774, 845-846, 934-940, 1105-1106, 1156, 1160, 1230, 1232-1233, 1237-1238, 1278-1279, 1308, 1310, 1320, 1324, 1329-1332, 1440-1441, 1453-1454, 1457-1458
Generated in workflow #3952 for commit 4b7df65 by the Vitest Coverage Report Action

@dwelle
Copy link
Member

dwelle commented Dec 15, 2024

There's a flake in the tests, too.

@dwelle
Copy link
Member

dwelle commented Dec 23, 2024

🚀

@dwelle dwelle merged commit 107eae3 into master Dec 23, 2024
10 checks passed
@dwelle dwelle deleted the ryan-di/resize-rewrite branch December 23, 2024 10:10
zsviczian added a commit to zsviczian/excalidraw that referenced this pull request Dec 23, 2024
mtolmacs added a commit that referenced this pull request Dec 26, 2024
* separate resizing logic for a single element

* replace resize logic in stats

* do not recompute width and height from points when they're already given

* correctly update linear elements' position when resized

* update snapshots

* lint

* simplify linear resizing logic

* fix initial scale for aspect ratio

* update tests for linear elements

* test typo

* separate pointer from resizing for multiple elements

* lint and simplify

* fix tests

* lint

* provide scene in param instead

* type

* refactor code

* fix floating in tests

* remove restrictions/checks on width & height

* update pointer to dimension to prevent regression

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
mtolmacs pushed a commit that referenced this pull request Dec 26, 2024
* separate resizing logic for a single element

* replace resize logic in stats

* do not recompute width and height from points when they're already given

* correctly update linear elements' position when resized

* update snapshots

* lint

* simplify linear resizing logic

* fix initial scale for aspect ratio

* update tests for linear elements

* test typo

* separate pointer from resizing for multiple elements

* lint and simplify

* fix tests

* lint

* provide scene in param instead

* type

* refactor code

* fix floating in tests

* remove restrictions/checks on width & height

* update pointer to dimension to prevent regression

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: incorrect offset when dragging the first point of a resized linear element

3 participants