0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-26 16:56:11 -05:00

Add missing gotopage interaction.

This commit is contained in:
Andrey Antukh 2016-07-30 22:47:55 +03:00
parent 1e4a379400
commit 668898903f
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
3 changed files with 9 additions and 3 deletions

View file

@ -188,7 +188,7 @@
:on-change (partial on-change form-ref :page)
:value (pr-str (:page @form-ref))}
(for [page pages
:let [key (pr-str (:id page))]]
:let [key (:index page)]]
[:option {:key key :value key} (:name page)])]]])))
(def pages-input

View file

@ -7,10 +7,12 @@
(ns uxbox.view.ui.viewer.interactions
(:require [promesa.core :as p]
[uxbox.util.dom :as dom]
[uxbox.util.rstore :as rs]
[uxbox.main.geom :as geom]
[uxbox.main.geom.matrix :as gmt]
[uxbox.main.geom.point :as gpt]
[uxbox.main.state :as st]
[uxbox.view.data.viewer :as dv]
[vendor.snapsvg])
(:import goog.events.EventType))
@ -181,6 +183,10 @@
[{:keys [url]}]
(set! (.-href js/location) url))
(defn- run-gotopage-interaction
[{:keys [page]}]
(rs/emit! (dv/select-page page)))
(defn- run-color-interaction
[{:keys [element fill-color stroke-color direction easing delay duration]}]
(let [shape (get-in @st/state [:shapes-by-id element])
@ -223,9 +229,10 @@
:hide (run-hide-interaction itx)
:size (run-size-interaction itx)
:opacity (run-opacity-interaction itx)
:gotourl (run-gotourl-interaction itx)
:color (run-color-interaction itx)
:rotate (run-rotate-interaction itx)
:gotourl (run-gotourl-interaction itx)
:gotopage (run-gotopage-interaction itx)
(throw (ex-info "undefined interaction" {:action action}))))
;; --- Main Api

View file

@ -8,7 +8,6 @@
(ns uxbox.view.ui.viewer.sitemap
(:require [sablono.core :refer-macros (html)]
[lentes.core :as l]
[rum.core :as rum]
[uxbox.util.i18n :refer (tr)]
[uxbox.util.mixins :as mx :include-macros true]
[uxbox.util.data :refer (parse-int)]