mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
💄 Cosmetic changes on snap-points ns.
This commit is contained in:
parent
da1179f628
commit
8396357f36
1 changed files with 19 additions and 10 deletions
|
@ -1,11 +1,21 @@
|
||||||
|
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
;;
|
||||||
|
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||||
|
;; defined by the Mozilla Public License, v. 2.0.
|
||||||
|
;;
|
||||||
|
;; Copyright (c) 2020 UXBOX Labs SL
|
||||||
|
|
||||||
(ns app.main.ui.workspace.snap-points
|
(ns app.main.ui.workspace.snap-points
|
||||||
(:require
|
(:require
|
||||||
[rumext.alpha :as mf]
|
[app.common.data :as d]
|
||||||
[beicon.core :as rx]
|
[app.common.geom.point :as gpt]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.snap :as snap]
|
[app.main.snap :as snap]
|
||||||
[app.util.geom.snap-points :as sp]
|
[app.util.geom.snap-points :as sp]
|
||||||
[app.common.geom.point :as gpt]))
|
[beicon.core :as rx]
|
||||||
|
[rumext.alpha :as mf]))
|
||||||
|
|
||||||
(def ^:private line-color "#D383DA")
|
(def ^:private line-color "#D383DA")
|
||||||
|
|
||||||
|
@ -60,13 +70,12 @@
|
||||||
|
|
||||||
(mf/use-effect
|
(mf/use-effect
|
||||||
(fn []
|
(fn []
|
||||||
(let [sub
|
(let [sub (->> subject
|
||||||
(->> subject
|
(rx/switch-map #(rx/combine-latest
|
||||||
(rx/switch-map #(rx/combine-latest
|
d/concat
|
||||||
concat
|
(get-snap :y %)
|
||||||
(get-snap :y %)
|
(get-snap :x %)))
|
||||||
(get-snap :x %)))
|
(rx/subs #(reset! state %)))]
|
||||||
(rx/subs #(reset! state %)))]
|
|
||||||
|
|
||||||
;; On unmount callback
|
;; On unmount callback
|
||||||
#(rx/dispose! sub))))
|
#(rx/dispose! sub))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue