Restore workspace scroll with space.

This commit is contained in:
Andrey Antukh 2016-03-29 22:17:56 +03:00
parent 6f90f343e6
commit 33fd84623f

View file

@ -45,7 +45,7 @@
(letfn [(handle-scroll-interaction [] (letfn [(handle-scroll-interaction []
(let [stoper (->> uuc/actions-s (let [stoper (->> uuc/actions-s
(rx/map :type) (rx/map :type)
(rx/filter #(not= % :scroll/viewport)) (rx/filter #(empty? %))
(rx/take 1)) (rx/take 1))
local (:rum/local own) local (:rum/local own)
initial @uuwb/mouse-viewport-a] initial @uuwb/mouse-viewport-a]
@ -70,7 +70,7 @@
sub1 (as-> uuc/actions-s $ sub1 (as-> uuc/actions-s $
(rx/map :type $) (rx/map :type $)
(rx/dedupe $) (rx/dedupe $)
(rx/filter #(= :scroll/viewport %) $) (rx/filter #(= "ui.workspace.scroll" %) $)
(rx/on-value $ handle-scroll-interaction)) (rx/on-value $ handle-scroll-interaction))
sub2 (udp/watch-page-changes pageid)] sub2 (udp/watch-page-changes pageid)]
(set! (.-scrollLeft el) uuwb/canvas-start-scroll-x) (set! (.-scrollLeft el) uuwb/canvas-start-scroll-x)