mirror of
https://github.com/penpot/penpot.git
synced 2026-09-25 13:26:16 +00:00
⚡ gate workspace overlays during pan and zoom
This commit is contained in:
parent
875171ee86
commit
113156592a
@ -257,6 +257,10 @@
|
|||||||
|
|
||||||
;; True when we are opening a new file or switching to a new page
|
;; True when we are opening a new file or switching to a new page
|
||||||
page-transition? (mf/deref wasm.api/page-transition?)
|
page-transition? (mf/deref wasm.api/page-transition?)
|
||||||
|
;; True during pan/zoom (set by `set-view-box`). Used to suppress heavy
|
||||||
|
;; overlays that would otherwise re-render + recompute geometry on every
|
||||||
|
;; viewbox change of the gesture.
|
||||||
|
view-interaction? (mf/deref wasm.api/view-interaction-active?)
|
||||||
context-loss-overlay? (mf/deref wasm.api/context-loss-overlay?)
|
context-loss-overlay? (mf/deref wasm.api/context-loss-overlay?)
|
||||||
transition-reveal-rulers? (mf/deref wasm.api/transition-reveal-rulers?)
|
transition-reveal-rulers? (mf/deref wasm.api/transition-reveal-rulers?)
|
||||||
|
|
||||||
@ -289,7 +293,7 @@
|
|||||||
show-cursor-tooltip? tooltip
|
show-cursor-tooltip? tooltip
|
||||||
show-draw-area? drawing-obj
|
show-draw-area? drawing-obj
|
||||||
show-gradient-handlers? (= (count selected) 1)
|
show-gradient-handlers? (= (count selected) 1)
|
||||||
show-grids? (and (contains? layout :display-guides) (not page-transition?))
|
show-grids? (and (contains? layout :display-guides) (not page-transition?) (not view-interaction?))
|
||||||
|
|
||||||
show-frame-outline? (and (= transform :move) (not panning) (not page-transition?))
|
show-frame-outline? (and (= transform :move) (not panning) (not page-transition?))
|
||||||
show-outlines? (and (nil? transform)
|
show-outlines? (and (nil? transform)
|
||||||
@ -325,7 +329,8 @@
|
|||||||
show-measures? (and (not transform)
|
show-measures? (and (not transform)
|
||||||
(not path-editing?)
|
(not path-editing?)
|
||||||
(or show-distances? mode-inspect? read-only?)
|
(or show-distances? mode-inspect? read-only?)
|
||||||
(not page-transition?))
|
(not page-transition?)
|
||||||
|
(not view-interaction?))
|
||||||
show-artboard-names? (and (contains? layout :display-artboard-names) (not page-transition?))
|
show-artboard-names? (and (contains? layout :display-artboard-names) (not page-transition?))
|
||||||
hide-ui? (contains? layout :hide-ui)
|
hide-ui? (contains? layout :hide-ui)
|
||||||
|
|
||||||
@ -360,6 +365,7 @@
|
|||||||
|
|
||||||
show-padding?
|
show-padding?
|
||||||
(and (nil? transform)
|
(and (nil? transform)
|
||||||
|
(not view-interaction?)
|
||||||
single-select?
|
single-select?
|
||||||
(= (:type first-shape) :frame)
|
(= (:type first-shape) :frame)
|
||||||
(= (:layout first-shape) :flex)
|
(= (:layout first-shape) :flex)
|
||||||
@ -367,6 +373,7 @@
|
|||||||
|
|
||||||
show-margin?
|
show-margin?
|
||||||
(and (nil? transform)
|
(and (nil? transform)
|
||||||
|
(not view-interaction?)
|
||||||
single-select?
|
single-select?
|
||||||
(= (:layout selected-frame) :flex)
|
(= (:layout selected-frame) :flex)
|
||||||
(zero? (:rotation first-shape)))
|
(zero? (:rotation first-shape)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user