mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 01:51:38 +02:00
Replace builtin rstore impl with potok.
This commit is contained in:
parent
6f8f115422
commit
40b48318ff
92 changed files with 965 additions and 1063 deletions
|
@ -8,8 +8,8 @@
|
|||
(:require [sablono.core :refer-macros [html]]
|
||||
[lentes.core :as l]
|
||||
[beicon.core :as rx]
|
||||
[uxbox.util.rstore :as rs]
|
||||
[uxbox.main.state :as st]
|
||||
[potok.core :as ptk]
|
||||
[uxbox.store :as st]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.main.ui.keyboard :as kbd]
|
||||
[uxbox.main.ui.workspace.base :as wb]
|
||||
|
@ -41,10 +41,10 @@
|
|||
(rx/filter #(= % :mouse/up))
|
||||
(rx/take 1))
|
||||
stream (rx/take-until stoper wb/mouse-delta-s)
|
||||
on-move #(rs/emit! (uds/move-shape shape %))
|
||||
on-move #(st/emit! (uds/move-shape shape %))
|
||||
on-stop #(rlocks/release! :shape/move)]
|
||||
(when @wb/alignment-ref
|
||||
(rs/emit! (uds/initial-align-shape shape)))
|
||||
(st/emit! (uds/initial-align-shape shape)))
|
||||
(rx/subscribe stream on-move nil on-stop)))]
|
||||
|
||||
(rlocks/acquire! :shape/move)
|
||||
|
@ -65,16 +65,16 @@
|
|||
(and (not selected?) (empty? selected))
|
||||
(do
|
||||
(dom/stop-propagation event)
|
||||
(rs/emit! (uds/select-shape id))
|
||||
(st/emit! (uds/select-shape id))
|
||||
(start-move))
|
||||
|
||||
(and (not selected?) (not (empty? selected)))
|
||||
(do
|
||||
(dom/stop-propagation event)
|
||||
(if (kbd/shift? event)
|
||||
(rs/emit! (uds/select-shape id))
|
||||
(st/emit! (uds/select-shape id))
|
||||
(do
|
||||
(rs/emit! (uds/deselect-all)
|
||||
(st/emit! (uds/deselect-all)
|
||||
(uds/select-shape id))
|
||||
(start-move))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue