mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
✨ Update check-browser? helper
This commit is contained in:
parent
e9d30bf2c1
commit
114639ca1e
@ -216,7 +216,7 @@
|
||||
(defn ^boolean check-browser? [candidate]
|
||||
(dm/assert! (contains? valid-browsers candidate))
|
||||
(if (= candidate :safari)
|
||||
(contains? #{:safari :safari-16 :safari-17} browser)
|
||||
(contains? #{:safari :safari-16 :safari-17 :safari-18 :safari-26} browser)
|
||||
(= candidate browser)))
|
||||
|
||||
(defn ^boolean check-platform? [candidate]
|
||||
|
||||
@ -364,7 +364,7 @@
|
||||
;; NOTE: this teoretically breaks hooks rules, but in practice
|
||||
;; it is imposible to really break it
|
||||
maybe-zoom
|
||||
(when (or (cf/check-browser? :safari) (cf/check-browser? :safari-26) (cf/check-browser? :safari-18))
|
||||
(when (cf/check-browser? :safari)
|
||||
(mf/deref refs/selected-zoom))
|
||||
|
||||
shape (cond-> shape
|
||||
@ -424,7 +424,7 @@
|
||||
(obj/merge!
|
||||
#js {:transform (dm/fmt "translate(%px, %px)" (- (dm/get-prop shape :x) x) (- (dm/get-prop shape :y) y))})
|
||||
|
||||
(or (cf/check-browser? :safari-18) (cf/check-browser? :safari-26) (cf/check-browser? :safari-17))
|
||||
(and (cf/check-browser? :safari) (not (cf/check-browser? :safari-16)))
|
||||
(obj/merge!
|
||||
#js {:height "100%"
|
||||
:display "flex"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user