mirror of
https://github.com/penpot/penpot.git
synced 2025-04-01 17:41:50 -05:00
commit
7e398515d3
12 changed files with 41 additions and 18 deletions
|
@ -299,12 +299,16 @@
|
|||
|
||||
(cond-> shape
|
||||
(neg? dot-x)
|
||||
(-> (cr/update! :flip-x not)
|
||||
(cr/update! :rotation -))
|
||||
(cr/update! :flip-x not)
|
||||
|
||||
(neg? dot-x)
|
||||
(cr/update! :rotation -)
|
||||
|
||||
(neg? dot-y)
|
||||
(-> (cr/update! :flip-y not)
|
||||
(cr/update! :rotation -)))))
|
||||
(cr/update! :flip-y not)
|
||||
|
||||
(neg? dot-y)
|
||||
(cr/update! :rotation -))))
|
||||
|
||||
(defn- apply-transform-move
|
||||
"Given a new set of points transformed, set up the rectangle so it keeps
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
[app.common.uuid :as uuid]
|
||||
[clojure.set :as set]))
|
||||
|
||||
(cr/defrecord Shape [id name type x y width height rotation selrect points transform transform-inverse parent-id frame-id])
|
||||
(cr/defrecord Shape [id name type x y width height rotation selrect points transform transform-inverse parent-id frame-id flip-x flip-y])
|
||||
|
||||
(defn shape?
|
||||
[o]
|
||||
|
|
|
@ -249,14 +249,16 @@
|
|||
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(d/update-in-when state [:comments thread-id id] assoc :content content))
|
||||
(-> state
|
||||
(d/update-in-when [:comments thread-id id] assoc :content content)))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [share-id (-> state :viewer-local :share-id)]
|
||||
(let [file-id (:current-file-id state)
|
||||
share-id (-> state :viewer-local :share-id)]
|
||||
(->> (rp/cmd! :update-comment {:id id :content content :share-id share-id})
|
||||
(rx/catch #(rx/throw {:type :comment-error}))
|
||||
(rx/ignore))))))
|
||||
(rx/map #(retrieve-comment-threads file-id)))))))
|
||||
|
||||
(defn delete-comment-thread-on-workspace
|
||||
[{:keys [id] :as thread}]
|
||||
|
|
|
@ -66,8 +66,7 @@
|
|||
|
||||
&:hover {
|
||||
.cell-name {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,10 @@
|
|||
(conj :rect :circle :path :bool))]
|
||||
(or (= uuid/zero id)
|
||||
(and (or (str/includes? (str/lower (:name shape)) (str/lower search))
|
||||
(str/includes? (dm/str (:id shape)) (str/lower search)))
|
||||
;; Only for local development we allow search for ids. Otherwise will be hard
|
||||
;; search for numbers or single letter shape names (ie: "A")
|
||||
(and *assert*
|
||||
(str/includes? (dm/str (:id shape)) (str/lower search))))
|
||||
(or (empty? filters)
|
||||
(and (contains? filters :component)
|
||||
(contains? shape :component-id))
|
||||
|
|
|
@ -616,9 +616,10 @@
|
|||
|
||||
[:div {:class (stl/css :name-wrapper)}
|
||||
[:div {:class (stl/css :component-name)}
|
||||
(if multi
|
||||
(tr "settings.multiple")
|
||||
(cfh/last-path shape-name))]
|
||||
[:span {:class (stl/css :component-name-inside)}
|
||||
(if multi
|
||||
(tr "settings.multiple")
|
||||
(cfh/last-path shape-name))]]
|
||||
|
||||
(when (and can-swap? (not multi))
|
||||
[:div {:class (stl/css :component-parent-name)}
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
padding-right: 0.5rem;
|
||||
.component-name-wrapper {
|
||||
width: 100%;
|
||||
|
||||
border-radius: $br-8;
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +92,7 @@
|
|||
min-height: $s-32;
|
||||
padding: $s-8 0 $s-8 $s-2;
|
||||
border-radius: $br-8 0 0 $br-8;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.component-name {
|
||||
|
@ -103,6 +103,11 @@
|
|||
min-height: $s-16;
|
||||
}
|
||||
|
||||
.component-name-inside {
|
||||
direction: ltr;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
.component-parent-name {
|
||||
@include bodySmallTypography;
|
||||
@include textEllipsis;
|
||||
|
|
|
@ -189,6 +189,7 @@
|
|||
;; shortcuts.unmask
|
||||
;; shortcuts.v-distribute
|
||||
;; shortcuts.zoom-selected
|
||||
;; shortcuts.toggle-layout-grid
|
||||
(let [translat-pre (case type
|
||||
:sc "shortcuts."
|
||||
:sec "shortcut-section."
|
||||
|
|
|
@ -335,8 +335,8 @@
|
|||
|
||||
flip-x (get shape :flip-x)
|
||||
flip-y (get shape :flip-y)
|
||||
half-flip? (or (and (some? flip-x) (not (some? flip-y)))
|
||||
(and (some? flip-y) (not (some? flip-x))))]
|
||||
half-flip? (or (and flip-x (not flip-y))
|
||||
(and flip-y (not flip-x)))]
|
||||
|
||||
(when (and (not ^boolean read-only?)
|
||||
(not (:transforming shape))
|
||||
|
@ -357,7 +357,7 @@
|
|||
(and ^boolean half-flip?
|
||||
(or (= position :top-right)
|
||||
(= position :bottom-left)))
|
||||
(- rotation 90)
|
||||
(+ rotation 90)
|
||||
|
||||
:else
|
||||
rotation)
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
:height :size
|
||||
:min-width :size
|
||||
:min-height :size
|
||||
:max-width :size
|
||||
:max-height :size
|
||||
:background :color
|
||||
:border :border
|
||||
:border-radius :string-or-size-array
|
||||
|
|
|
@ -3023,6 +3023,9 @@ msgstr "Zoom lense increase"
|
|||
msgid "shortcuts.zoom-selected"
|
||||
msgstr "Zoom to selected"
|
||||
|
||||
msgid "shortcuts.toggle-layout-grid"
|
||||
msgstr "Add/remove grid layout"
|
||||
|
||||
#: src/app/main/ui/dashboard/team.cljs
|
||||
msgid "team.webhooks.max-length"
|
||||
msgstr "The webhook name must contain at most 2048 characters."
|
||||
|
|
|
@ -3069,6 +3069,9 @@ msgstr "Incrementar zoom a objetivo"
|
|||
msgid "shortcuts.zoom-selected"
|
||||
msgstr "Zoom a selección"
|
||||
|
||||
msgid "shortcuts.toggle-layout-grid"
|
||||
msgstr "Añadir/eliminar grid layout"
|
||||
|
||||
#: src/app/main/ui/dashboard/team.cljs
|
||||
msgid "team.webhooks.max-length"
|
||||
msgstr "El nombre del webhook debe contener como máximo 2048 caracteres."
|
||||
|
|
Loading…
Add table
Reference in a new issue