mirror of
https://github.com/penpot/penpot.git
synced 2025-06-13 01:51:39 +02:00
✨ Simplify changes detection and commit.
With minor code cleaning.
This commit is contained in:
parent
8dd6c8457f
commit
1d726564df
4 changed files with 279 additions and 265 deletions
|
@ -2,11 +2,16 @@
|
|||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
;; Copyright (c) 2015-2020 Andrey Antukh <niwi@niwi.nz>
|
||||
|
||||
(ns uxbox.util.dom
|
||||
(:require [goog.dom :as dom]))
|
||||
(:require
|
||||
[goog.dom :as dom]
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
;; --- Deprecated methods
|
||||
|
||||
|
@ -22,6 +27,16 @@
|
|||
[e]
|
||||
(.-target e))
|
||||
|
||||
(defn classnames
|
||||
[& params]
|
||||
(assert (even? (count params)))
|
||||
(str/join " " (reduce (fn [acc [k v]]
|
||||
(if (true? v)
|
||||
(conj acc (name k))
|
||||
acc))
|
||||
[]
|
||||
(partition 2 params))))
|
||||
|
||||
;; --- New methods
|
||||
|
||||
(defn get-element-by-class
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue