mirror of
https://github.com/penpot/penpot.git
synced 2026-02-05 04:02:03 -05:00
Compare commits
2 Commits
staging-re
...
superalex-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
616504dc84 | ||
|
|
8300e70ab0 |
@@ -568,7 +568,9 @@
|
||||
(extract-property-changes modif-tree)]
|
||||
(-> state
|
||||
(assoc :prev-wasm-props (:wasm-props state))
|
||||
(assoc :wasm-props property-changes))))
|
||||
(assoc :wasm-props property-changes)
|
||||
;; Keep overlays in sync during WASM transforms.
|
||||
(assoc :workspace-modifiers modif-tree))))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
[app.common.types.path :as path]
|
||||
[app.common.types.shape :as cts]
|
||||
[app.common.types.shape.layout :as ctl]
|
||||
[app.common.types.shape-tree :as ctt]
|
||||
[app.main.data.common :as dcm]
|
||||
[app.main.data.workspace.transforms :as dwt]
|
||||
[app.main.data.workspace.variants :as dwv]
|
||||
@@ -98,6 +99,7 @@
|
||||
drawing (mf/deref refs/workspace-drawing)
|
||||
focus (mf/deref refs/workspace-focus-selected)
|
||||
wasm-modifiers (mf/deref refs/workspace-wasm-modifiers)
|
||||
modifiers (mf/deref refs/workspace-modifiers)
|
||||
|
||||
workspace-editor-state (mf/deref refs/workspace-editor-state)
|
||||
|
||||
@@ -364,11 +366,11 @@
|
||||
(when (and @canvas-init? initialized?)
|
||||
(wasm.api/set-canvas-background background)))
|
||||
|
||||
(mf/with-effect [@canvas-init? hover-grid? @hover-top-frame-id]
|
||||
(when @canvas-init?
|
||||
(if hover-grid?
|
||||
(wasm.api/show-grid @hover-top-frame-id)
|
||||
(wasm.api/clear-grid))))
|
||||
;; (mf/with-effect [@canvas-init? hover-grid? @hover-top-frame-id]
|
||||
;; (when @canvas-init?
|
||||
;; (if hover-grid?
|
||||
;; (wasm.api/show-grid @hover-top-frame-id)
|
||||
;; (wasm.api/clear-grid))))
|
||||
|
||||
(hooks/setup-dom-events zoom disable-paste-ref in-viewport-ref read-only? drawing-tool path-drawing?)
|
||||
(hooks/setup-viewport-size vport viewport-ref)
|
||||
@@ -701,13 +703,27 @@
|
||||
:on-click add-variant}])
|
||||
|
||||
[:g.grid-layout-editor {:clipPath "url(#clip-handlers)"}
|
||||
(when show-grid-editor?
|
||||
(when (or show-grid-editor? hover-grid?)
|
||||
[:& grid-layout/editor
|
||||
{:zoom zoom
|
||||
:objects objects-modified
|
||||
:objects base-objects
|
||||
:modifiers modifiers
|
||||
:shape (or (get base-objects edition)
|
||||
(get base-objects @hover-top-frame-id))
|
||||
:view-only (not show-grid-editor?)}])]
|
||||
:view-only (not show-grid-editor?)}])
|
||||
|
||||
(for [frame (ctt/get-frames objects)]
|
||||
(when (and (ctl/grid-layout? frame)
|
||||
(empty? (:shapes frame))
|
||||
(not= edition (:id frame))
|
||||
(not= @hover-top-frame-id (:id frame)))
|
||||
[:& grid-layout/editor
|
||||
{:zoom zoom
|
||||
:key (dm/str (:id frame))
|
||||
:objects base-objects
|
||||
:modifiers modifiers
|
||||
:shape frame
|
||||
:view-only true}]))]
|
||||
|
||||
[:g.scrollbar-wrapper {:clipPath "url(#clip-handlers)"}
|
||||
[:& scroll-bars/viewport-scrollbars
|
||||
|
||||
Reference in New Issue
Block a user