mirror of
https://github.com/penpot/penpot.git
synced 2025-05-30 10:26:11 +02:00
✨ Improved transformation from and to JS for plugins
This commit is contained in:
parent
42230f2630
commit
ac58a5b8fa
15 changed files with 1359 additions and 622 deletions
|
@ -8,6 +8,7 @@
|
|||
(:require
|
||||
[app.common.record :as crc]
|
||||
[app.config :as cfg]
|
||||
[app.plugins.format :as format]
|
||||
[app.plugins.utils :as u]
|
||||
[app.util.object :as obj]))
|
||||
|
||||
|
@ -54,5 +55,5 @@
|
|||
(-> (ActiveUserProxy. plugin-id session-id)
|
||||
(add-user-properties)
|
||||
(crc/add-properties!
|
||||
{:name "position" :get (fn [_] (-> (u/locate-presence session-id) :point u/to-js))}
|
||||
{:name "position" :get (fn [_] (-> (u/locate-presence session-id) :point format/format-point))}
|
||||
{:name "zoom" :get (fn [_] (-> (u/locate-presence session-id) :zoom))})))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue