mirror of
https://github.com/penpot/penpot.git
synced 2025-02-26 08:45:34 -05:00
Add missing gotopage interaction.
This commit is contained in:
parent
1e4a379400
commit
668898903f
3 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Add table
Reference in a new issue