0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-07 15:39:42 -05:00

🐛 Fix issues when updating selrect in paths

This commit is contained in:
alonso.torres 2022-01-12 15:55:29 +01:00
parent 8b8d614150
commit afba5ff083
2 changed files with 16 additions and 2 deletions

View file

@ -52,6 +52,7 @@
- Fix blur input field when click on viewport [Taiga #2164](https://tree.taiga.io/project/penpot/issue/2164)
- Fix default page id in workspace [Taiga #2205](https://tree.taiga.io/project/penpot/issue/2205)
- Fix problem when importing a file with grids [Taiga #2314](https://tree.taiga.io/project/penpot/issue/2314)
- Fix issues when updating selrect in paths [Taiga #2366](https://tree.taiga.io/project/penpot/issue/2366)
### :arrow_up: Deps updates

View file

@ -29,7 +29,12 @@
[old-points old-selrect] (helpers/content->points+selrect shape old-content)
[new-points new-selrect] (helpers/content->points+selrect shape new-content)
rch (if (empty? new-content)
rch (cond
;; https://tree.taiga.io/project/penpot/issue/2366
(nil? shape-id)
[]
(empty? new-content)
[{:type :del-obj
:id shape-id
:page-id page-id}
@ -37,6 +42,7 @@
:page-id page-id
:shapes [shape-id]}]
:else
[{:type :mod-obj
:id shape-id
:page-id page-id
@ -47,7 +53,12 @@
:page-id page-id
:shapes [shape-id]}])
uch (if (empty? new-content)
uch (cond
;; https://tree.taiga.io/project/penpot/issue/2366
(nil? shape-id)
[]
(empty? new-content)
[{:type :add-obj
:id shape-id
:obj shape
@ -58,6 +69,8 @@
{:type :reg-objects
:page-id page-id
:shapes [shape-id]}]
:else
[{:type :mod-obj
:id shape-id
:page-id page-id