mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -05:00
🐛 Changing pages while comments activated will not close the panel
This commit is contained in:
parent
50fd44d3f2
commit
e5430259e9
3 changed files with 15 additions and 13 deletions
|
@ -44,6 +44,7 @@
|
|||
- Right click over artboard name to open its menu [Taiga #1679](https://tree.taiga.io/project/penpot/issue/1679)
|
||||
- Make the default session cookue use SameSite=Lax instead of Strict (causes some issues in latest versions of Chrome).
|
||||
- Fix "open in new tab" on dashboard [Taiga #2235](https://tree.taiga.io/project/penpot/issue/2355)
|
||||
- Changing pages while comments activated will not close the panel [#1350](https://github.com/penpot/penpot/issues/1350)
|
||||
- Fix navigate comments in right sidebar [Taiga #2163](https://tree.taiga.io/project/penpot/issue/2163)
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
|
|
|
@ -282,10 +282,13 @@
|
|||
(let [local (-> (:workspace-local state)
|
||||
(dissoc :edition
|
||||
:edit-path
|
||||
:selected))]
|
||||
(-> state
|
||||
(assoc-in [:workspace-cache page-id] local)
|
||||
(dissoc :current-page-id :workspace-local :trimmed-page :workspace-drawing))))))
|
||||
:selected))
|
||||
exit-workspace? (not= :workspace (get-in state [:route :data :name]))]
|
||||
(cond-> (assoc-in state [:workspace-cache page-id] local)
|
||||
:always
|
||||
(dissoc :current-page-id :workspace-local :trimmed-page)
|
||||
exit-workspace?
|
||||
(dissoc :workspace-drawing))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Workspace Page CRUD
|
||||
|
@ -416,9 +419,9 @@
|
|||
(-> local
|
||||
(assoc :vport size)
|
||||
(update :vbox (fn [vbox]
|
||||
(-> vbox
|
||||
(update :width #(/ % wprop))
|
||||
(update :height #(/ % hprop))))))))
|
||||
(-> vbox
|
||||
(update :width #(/ % wprop))
|
||||
(update :height #(/ % hprop))))))))
|
||||
|
||||
(initialize [state local]
|
||||
(let [page-id (:current-page-id state)
|
||||
|
@ -445,7 +448,7 @@
|
|||
:y (+ (:y srect) (/ (- (:height srect) height) 2)))))))
|
||||
|
||||
(setup [state local]
|
||||
(if (and (:vbox local) (:vport local))
|
||||
(if (and (:vport local) (:vbox local))
|
||||
(update* local)
|
||||
(initialize state local)))]
|
||||
|
||||
|
|
|
@ -76,15 +76,13 @@
|
|||
(update [_ state]
|
||||
(update state :workspace-local
|
||||
(fn [{:keys [vbox zoom] :as local}]
|
||||
(let [pw (/ 50 zoom)
|
||||
ph (/ 200 zoom)
|
||||
(let [pw (/ 160 zoom)
|
||||
ph (/ 160 zoom)
|
||||
nw (mth/round (- (/ (:width vbox) 2) pw))
|
||||
nh (mth/round (- (/ (:height vbox) 2) ph))
|
||||
nx (- (:x position) nw)
|
||||
ny (- (:y position) nh)]
|
||||
|
||||
|
||||
(update local :vbox assoc :x nx :y ny)))))))
|
||||
(update local :vbox assoc :x nx :y ny)))))))
|
||||
|
||||
(defn navigate
|
||||
[thread]
|
||||
|
|
Loading…
Add table
Reference in a new issue