mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 04:41:40 +02:00
Merge remote-tracking branch 'origin/bugfixes' into develop
This commit is contained in:
commit
bfbc715977
14 changed files with 99 additions and 89 deletions
|
@ -6,14 +6,15 @@
|
|||
|
||||
(ns app.main.ui.measurements
|
||||
(:require
|
||||
[rumext.alpha :as mf]
|
||||
[app.common.data :as d]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
[app.common.math :as mth]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.main.store :as st]
|
||||
[cuerdas.core :as str]
|
||||
[okulary.core :as l]
|
||||
[app.common.data :as d]
|
||||
[app.common.math :as mth]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.main.store :as st]))
|
||||
[rumext.alpha :as mf]))
|
||||
|
||||
;; ------------------------------------------------
|
||||
;; CONSTANTS
|
||||
|
@ -230,7 +231,8 @@
|
|||
:stroke-width (/ select-guide-width zoom)
|
||||
:stroke-dasharray (/ select-guide-dasharray zoom)}}])])
|
||||
|
||||
(mf/defc measurement [{:keys [bounds frame selected-shapes hover-shape zoom]}]
|
||||
(mf/defc measurement
|
||||
[{:keys [bounds frame selected-shapes hover-shape zoom]}]
|
||||
(let [selected-ids (into #{} (map :id) selected-shapes)
|
||||
selected-selrect (gsh/selection-rect selected-shapes)
|
||||
hover-selrect (:selrect hover-shape)
|
||||
|
@ -241,9 +243,9 @@
|
|||
[:g.measurement-feedback {:pointer-events "none"}
|
||||
[:& selection-guides {:selrect selected-selrect :bounds bounds :zoom zoom}]
|
||||
[:& size-display {:selrect selected-selrect :zoom zoom}]
|
||||
|
||||
|
||||
(if (or (not hover-shape) (not hover-selected-shape?))
|
||||
(when frame
|
||||
(when (and frame (not= uuid/zero (:id frame)))
|
||||
[:g.hover-shapes
|
||||
[:& distance-display {:from (:selrect frame)
|
||||
:to selected-selrect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue