mirror of
https://github.com/penpot/penpot.git
synced 2026-03-06 10:11:18 +00:00
🐛 Create variant doesn't work
This commit is contained in:
@@ -51,7 +51,6 @@
|
||||
[app.main.ui.workspace.viewport.viewport-ref :refer [create-viewport-ref]]
|
||||
[app.main.ui.workspace.viewport.widgets :as widgets]
|
||||
[app.render-wasm.api :as wasm.api]
|
||||
[app.render-wasm.shape :as wasm.shape]
|
||||
[app.util.debug :as dbg]
|
||||
[app.util.text-editor :as ted]
|
||||
[beicon.v2.core :as rx]
|
||||
@@ -348,9 +347,6 @@
|
||||
(wasm.api/show-grid @hover-top-frame-id)
|
||||
(wasm.api/clear-grid))))
|
||||
|
||||
(mf/with-effect [objects]
|
||||
(wasm.shape/set-current-page-objects! objects))
|
||||
|
||||
(hooks/setup-dom-events zoom disable-paste in-viewport? read-only? drawing-tool path-drawing?)
|
||||
(hooks/setup-viewport-size vport viewport-ref)
|
||||
(hooks/setup-cursor cursor alt? mod? space? panning drawing-tool path-drawing? path-editing? z? read-only?)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
[app.common.transit :as t]
|
||||
[app.common.types.shape :as shape]
|
||||
[app.common.types.shape.layout :as ctl]
|
||||
[app.main.refs :as refs]
|
||||
[app.render-wasm.api :as api]
|
||||
[beicon.v2.core :as rx]
|
||||
[clojure.core :as c]
|
||||
@@ -19,15 +20,12 @@
|
||||
(declare ^:private impl-assoc)
|
||||
(declare ^:private impl-conj)
|
||||
(declare ^:private impl-dissoc)
|
||||
(defonce ^:private current-page-objects {})
|
||||
|
||||
(defn set-current-page-objects!
|
||||
[objects]
|
||||
(set! current-page-objects objects))
|
||||
|
||||
(defn shape-in-current-page?
|
||||
"Check if a shape is in the current page by looking up the current page objects"
|
||||
[shape-id]
|
||||
(contains? current-page-objects shape-id))
|
||||
(let [objects (deref refs/workspace-page-objects)]
|
||||
(contains? objects shape-id)))
|
||||
|
||||
(defn map-entry
|
||||
[k v]
|
||||
|
||||
Reference in New Issue
Block a user