Cosmetic fixes on canvas components.

This commit is contained in:
Andrey Antukh 2016-07-09 21:31:43 +03:00
parent 6d82194f9f
commit 3a7e487f18
No known key found for this signature in database
GPG Key ID: 4DFEBCB8316A8B95

View File

@ -22,7 +22,7 @@
[uxbox.main.ui.core :as uuc] [uxbox.main.ui.core :as uuc]
[uxbox.main.ui.keyboard :as kbd] [uxbox.main.ui.keyboard :as kbd]
[uxbox.main.ui.shapes :as uus] [uxbox.main.ui.shapes :as uus]
[uxbox.util.mixins :as mx] [uxbox.util.mixins :as mx :include-macros true]
[uxbox.main.ui.workspace.base :as uuwb] [uxbox.main.ui.workspace.base :as uuwb]
[uxbox.main.ui.workspace.drawarea :refer (draw-area)] [uxbox.main.ui.workspace.drawarea :refer (draw-area)]
[uxbox.main.ui.workspace.movement :as cmov] [uxbox.main.ui.workspace.movement :as cmov]
@ -33,25 +33,17 @@
[uxbox.main.ui.workspace.grid :refer (grid)]) [uxbox.main.ui.workspace.grid :refer (grid)])
(:import goog.events.EventType)) (:import goog.events.EventType))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; --- Background
;; Background
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn background-render (mx/defc background
[] []
(html [:rect
[:rect {:x 0 :y 0
{:x 0 :y 0 :width "100%" :height "100%" :fill "white"}])) :width "100%"
:height "100%"
:fill "white"}])
(def background ;; --- Canvas
(mx/component
{:render background-render
:name "background"
:mixins [mx/static]}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Canvas
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- canvas-render (defn- canvas-render
[own {:keys [width height id] :as page}] [own {:keys [width height id] :as page}]
@ -78,9 +70,7 @@
:name "canvas" :name "canvas"
:mixins [mx/static mx/reactive]})) :mixins [mx/static mx/reactive]}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; --- Viewport
;; Viewport Component
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn viewport-render (defn viewport-render
[own] [own]