Skip to content

Commit c0c7022

Browse files
committed
fix fill tool
1 parent f165373 commit c0c7022

File tree

2 files changed

+3
-77
lines changed

2 files changed

+3
-77
lines changed

.clj-kondo/metosin/malli-types-cljs/config.edn

+1-76
Original file line numberDiff line numberDiff line change
@@ -13093,82 +13093,7 @@
1309313093
:ret :boolean}}},
1309413094
->snapping-points {:arities {2 {:args [:seqable :set],
1309513095
:ret :seqable}}}},
13096-
renderer.history.handlers {history-path {:arities {1 {:args [{:op :keys,
13097-
:opt {:explanation :string,
13098-
:system-fonts :vector,
13099-
:copied-bounds :seqable,
13100-
:active-document :any,
13101-
:adjusted-pointer-offset :seqable,
13102-
:re-pressed.core/keydown :map,
13103-
:pivot-point :seqable,
13104-
:copied-elements :seqable,
13105-
:pointer-offset :seqable,
13106-
:event-time :number,
13107-
:drag :boolean,
13108-
:version :string,
13109-
:dom-rect {:op :keys,
13110-
:req {:x :number,
13111-
:y :number,
13112-
:width :number,
13113-
:height :number,
13114-
:top :number,
13115-
:right :number,
13116-
:bottom :number,
13117-
:left :number}},
13118-
:clicked-element :any,
13119-
:primary-tool :any},
13120-
:req {:double-click-delta :any,
13121-
:dialogs :vector,
13122-
:repl-mode :keyword,
13123-
:snap {:op :keys,
13124-
:opt {:nearest-neighbor {:op :keys,
13125-
:req {:point :seqable,
13126-
:base-point :seqable,
13127-
:dist-squared :number}}},
13128-
:req {:active :boolean,
13129-
:threshold :number,
13130-
:options :set}},
13131-
:grid :boolean,
13132-
:tool :any,
13133-
:ruler {:op :keys,
13134-
:req {:visible :boolean,
13135-
:locked :boolean,
13136-
:size :number}},
13137-
:cursor :string,
13138-
:pointer-pos :seqable,
13139-
:state :keyword,
13140-
:window {:op :keys,
13141-
:req {:maximized :boolean,
13142-
:minimized :boolean,
13143-
:fullscreen :boolean,
13144-
:focused :boolean}},
13145-
:theme {:op :keys,
13146-
:opt {:native-mode :keyword},
13147-
:req {:mode :keyword}},
13148-
:lang :any,
13149-
:document-tabs :vector,
13150-
:documents :map,
13151-
:notifications :seqable,
13152-
:recent :vector,
13153-
:zoom-sensitivity :any,
13154-
:debug-info :boolean,
13155-
:adjusted-pointer-pos :seqable,
13156-
:timeline {:op :keys,
13157-
:req {:time :number,
13158-
:speed :number,
13159-
:replay? :boolean,
13160-
:grid-snap? :boolean,
13161-
:guide-snap? :boolean,
13162-
:paused? :boolean}},
13163-
:backdrop :boolean,
13164-
:drag-threshold :number,
13165-
:fx :vector,
13166-
:panels :map,
13167-
:worker {:op :keys,
13168-
:req {:tasks :map}},
13169-
:pen-mode :boolean}}],
13170-
:ret :vector}}},
13171-
state-count {:arities {1 {:args [{:op :keys,
13096+
renderer.history.handlers {state-count {:arities {1 {:args [{:op :keys,
1317213097
:opt {:explanation :string,
1317313098
:system-fonts :vector,
1317413099
:copied-bounds :seqable,

src/renderer/tool/impl/misc/fill.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(ns renderer.tool.impl.misc.fill
22
(:require
3+
[renderer.document.handlers :as document.h]
34
[renderer.element.handlers :as element.h]
45
[renderer.tool.handlers :as h]
56
[renderer.tool.hierarchy :as hierarchy]))
@@ -20,7 +21,7 @@
2021

2122
(defmethod hierarchy/pointer-up :fill
2223
[db e]
23-
(let [color (get-in db [:documents (:active-document db) :fill])
24+
(let [color (document.h/attr db :fill)
2425
el-id (-> e :element :id)]
2526
(-> db
2627
(element.h/set-attr el-id :fill color)

0 commit comments

Comments
 (0)