mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 23:11:38 +02:00
🎉 Changed the user origin for shapes to their corner
This commit is contained in:
parent
db4e0fc314
commit
7ab3d86bc6
19 changed files with 195 additions and 182 deletions
|
@ -1,9 +1,7 @@
|
|||
(ns uxbox.util.debug
|
||||
"Debugging utils"
|
||||
(:require
|
||||
[uxbox.main.store :as store]))
|
||||
"Debugging utils")
|
||||
|
||||
(def debug-options #{:bounding-boxes :group :events :rotation-handler #_:simple-selection })
|
||||
(def debug-options #{:bounding-boxes :group :events :rotation-handler :selection-center #_:simple-selection })
|
||||
|
||||
(defonce ^:dynamic *debug* (atom #{}))
|
||||
|
||||
|
@ -13,6 +11,13 @@
|
|||
(defn -debug! [option] (swap! *debug* disj option))
|
||||
(defn debug? [option] (@*debug* option))
|
||||
|
||||
|
||||
(defn ^:export toggle-debug [name] (let [option (keyword name)]
|
||||
(if (debug? option)
|
||||
(-debug! option)
|
||||
(debug! option))))
|
||||
(defn ^:export debug-all [name] (debug-all!))
|
||||
|
||||
(defn tap
|
||||
"Transducer function that can execute a side-effect `effect-fn` per input"
|
||||
[effect-fn]
|
||||
|
@ -31,9 +36,4 @@
|
|||
(js/console.log str (clj->js val))
|
||||
val))
|
||||
|
||||
(defn dump-state []
|
||||
(logjs "state" @store/state))
|
||||
|
||||
(defn dump-objects []
|
||||
(let [page-id (get @store/state :current-page-id)]
|
||||
(logjs "state" (get-in @store/state [:workspace-data page-id :objects]))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue