mirror of
https://github.com/penpot/penpot.git
synced 2025-04-16 08:51:32 -05:00
Move geom from common to main.
This commit is contained in:
parent
277cde7978
commit
2810903020
33 changed files with 39 additions and 39 deletions
|
@ -9,7 +9,7 @@
|
|||
(:refer-clojure :exclude [keyword uuid vector boolean map set])
|
||||
(:require [struct.core :as st]
|
||||
[uxbox.common.i18n :refer (tr)]
|
||||
[uxbox.common.geom :refer (shape?)]))
|
||||
[uxbox.main.geom :refer (shape?)]))
|
||||
|
||||
;; (def datetime
|
||||
;; {:message "must be an instant"
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
[uxbox.common.rstore :as rs]
|
||||
[uxbox.common.router :as r]
|
||||
[uxbox.common.schema :as sc]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.common.workers :as uw]
|
||||
[uxbox.main.state :as st]
|
||||
[uxbox.main.state.shapes :as stsh]
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
[uxbox.main.constants :as c]
|
||||
[uxbox.common.rstore :as rs]
|
||||
[uxbox.common.schema :as sc]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.common.workers :as uw]
|
||||
[uxbox.main.state :as st]
|
||||
[uxbox.main.state.shapes :as stsh]
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
;;
|
||||
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
|
||||
|
||||
(ns uxbox.common.geom
|
||||
(:require [uxbox.common.geom.matrix :as gmt]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
(ns uxbox.main.geom
|
||||
(:require [uxbox.main.geom.matrix :as gmt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.util.math :as mth]
|
||||
[uxbox.main.state :as st]))
|
||||
|
|
@ -5,10 +5,10 @@
|
|||
;; Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
|
||||
(ns uxbox.common.geom.matrix
|
||||
(ns uxbox.main.geom.matrix
|
||||
(:require [cuerdas.core :as str]
|
||||
[uxbox.util.math :as mth]
|
||||
[uxbox.common.geom.point :as gpt]))
|
||||
[uxbox.main.geom.point :as gpt]))
|
||||
|
||||
(defrecord Matrix [a b c d tx ty])
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
;; Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
|
||||
(ns uxbox.common.geom.point
|
||||
(ns uxbox.main.geom.point
|
||||
(:refer-clojure :exclude [divide])
|
||||
(:require [uxbox.util.math :as mth]))
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
"A collection of functions for manage shapes insinde the state."
|
||||
(:require [uxbox.util.uuid :as uuid]
|
||||
[uxbox.util.data :refer (index-of)]
|
||||
[uxbox.common.geom :as geom]))
|
||||
[uxbox.main.geom :as geom]))
|
||||
|
||||
;; --- Shape Creation
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.common.geom :as geom]))
|
||||
[uxbox.main.geom :as geom]))
|
||||
|
||||
;; --- Circle Component
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.main.ui.core :as ui]
|
||||
[uxbox.main.ui.keyboard :as kbd]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]))
|
||||
|
||||
;; --- Lenses
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
[uxbox.main.ui.shapes.circle :as circle]
|
||||
[uxbox.main.ui.shapes.text :as text]
|
||||
[uxbox.main.ui.shapes.line :as line]
|
||||
[uxbox.common.geom :as geom]))
|
||||
[uxbox.main.geom :as geom]))
|
||||
|
||||
;; --- Helpers
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.common.geom :as geom]))
|
||||
[uxbox.main.geom :as geom]))
|
||||
|
||||
;; --- Icon Component
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.common.geom :as geom]))
|
||||
[uxbox.main.geom :as geom]))
|
||||
|
||||
;; --- Line Component
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]))
|
||||
|
||||
;; --- Rect Component
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.color :as color]
|
||||
[uxbox.util.dom :as dom])
|
||||
(:import goog.events.EventType))
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
[uxbox.main.data.pages :as udp]
|
||||
[uxbox.main.data.history :as udh]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.util.data :refer (classnames)]
|
||||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.messages :as uum]
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
[uxbox.main.state.project :as stpr]
|
||||
[uxbox.main.data.workspace :as dw]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[goog.events :as events])
|
||||
(:import goog.events.EventType))
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
[uxbox.main.data.projects :as dp]
|
||||
[uxbox.main.data.workspace :as dw]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int)]
|
||||
[uxbox.main.ui.core :as uuc]
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
[uxbox.main.ui.colorpicker :as cp]
|
||||
[uxbox.main.ui.workspace.recent-colors :refer (recent-colors)]
|
||||
[uxbox.main.ui.workspace.base :as wb]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int parse-float read-string)]))
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
[uxbox.main.ui.shapes :as shapes]
|
||||
[uxbox.main.ui.workspace.base :as wb]
|
||||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.util.dom :as dom]))
|
||||
|
||||
;; --- State
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
[uxbox.main.ui.users :as ui.u]
|
||||
[uxbox.main.ui.navigation :as nav]
|
||||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.util.math :as mth]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
[uxbox.main.ui.core :as uuc]
|
||||
[uxbox.main.ui.workspace.base :as wb]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.common.geom.point :as gpt]))
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.main.geom.point :as gpt]))
|
||||
|
||||
;; --- Public Api
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.main.ui.core :as uuc]
|
||||
[uxbox.main.ui.workspace.base :as wb]
|
||||
[uxbox.common.geom.point :as gpt]))
|
||||
[uxbox.main.geom.point :as gpt]))
|
||||
|
||||
(declare initialize)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
[uxbox.util.math :as mth]
|
||||
[uxbox.main.ui.workspace.base :as wb]
|
||||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.util.dom :as dom]))
|
||||
|
||||
(def ^:private ^:const immanted-zones
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
[uxbox.main.ui.core :as uuc]
|
||||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.workspace.base :as uuwb]
|
||||
[uxbox.common.geom.point :as gpt]))
|
||||
[uxbox.main.geom.point :as gpt]))
|
||||
|
||||
(defn watch-scroll-interactions
|
||||
[own]
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
[uxbox.main.state :as st]
|
||||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.core :as uuc]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]))
|
||||
|
||||
;; --- Constants
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
[uxbox.main.ui.workspace.sidebar.options.text :as options-text]
|
||||
[uxbox.main.ui.workspace.sidebar.options.stroke :as options-stroke]
|
||||
[uxbox.main.ui.workspace.sidebar.options.interactions :as options-interactions]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int parse-float read-string)]))
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.workspace.colorpicker :refer (colorpicker)]
|
||||
[uxbox.main.ui.workspace.recent-colors :refer (recent-colors)]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int parse-float read-string)]))
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.workspace.colorpicker :refer (colorpicker)]
|
||||
[uxbox.main.ui.workspace.recent-colors :refer (recent-colors)]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int parse-float read-string)]))
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.workspace.colorpicker :refer (colorpicker)]
|
||||
[uxbox.main.ui.workspace.recent-colors :refer (recent-colors)]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int parse-float read-string)]))
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
[uxbox.common.ui.mixins :as mx]
|
||||
[uxbox.main.ui.workspace.colorpicker :refer (colorpicker)]
|
||||
[uxbox.main.ui.workspace.recent-colors :refer (recent-colors)]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int parse-float read-string)]))
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
[uxbox.main.ui.workspace.colorpicker :refer (colorpicker)]
|
||||
[uxbox.main.ui.workspace.recent-colors :refer (recent-colors)]
|
||||
[uxbox.main.ui.workspace.base :as wb]
|
||||
[uxbox.common.geom :as geom]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (parse-int parse-float read-string)]))
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
(:require [cognitect.transit :as t]
|
||||
[com.cognitect.transit :as tr]
|
||||
[uxbox.util.data :refer (parse-int)]
|
||||
[uxbox.common.geom.point :as gpt]
|
||||
[uxbox.main.geom.point :as gpt]
|
||||
[uxbox.util.datetime :as dt]))
|
||||
|
||||
;; --- Transit Handlers
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
(:require [beicon.core :as rx]
|
||||
[uxbox.util.kdtree :as kd]
|
||||
[uxbox.worker.impl :as impl]
|
||||
[uxbox.common.geom.point :as gpt]))
|
||||
[uxbox.main.geom.point :as gpt]))
|
||||
|
||||
(defonce tree (kd/create))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue