idk man something hopefully helpful
This commit is contained in:
parent
5b5b9ae4c3
commit
551d572347
2 changed files with 14 additions and 1 deletions
|
|
@ -5,7 +5,9 @@
|
|||
Cheap by construction, like `subs/playback`: each reads a path and returns a
|
||||
value, so clicking a swatch notifies the swatches and nothing else."
|
||||
(:require [arthur.domain.creation :as creation]
|
||||
[arthur.domain.clip :as clip]
|
||||
[arthur.domain.nest :as nest]
|
||||
[arthur.domain.node :as node]
|
||||
[arthur.domain.pick :as pick]
|
||||
[arthur.footage.store :as store]
|
||||
[arthur.subs.playback :as playback]
|
||||
|
|
@ -93,7 +95,15 @@
|
|||
(when-let [{:keys [sid id frame] :as pl} (nest/placement clip st open path f)]
|
||||
(let [n (get-in clip [:symbols sid :nodes id])]
|
||||
(assoc pl :node n
|
||||
:bounds ((pick/bounds-of clip st sid n) frame))))))))
|
||||
;; An explicitly created symbol can be empty. It is still a
|
||||
;; valid creation destination, so give its occurrence a
|
||||
;; visible target box using the source symbol's stage until
|
||||
;; content supplies tighter bounds. Drawing-created symbols
|
||||
;; already take the normal content-bounds branch.
|
||||
:bounds (or ((pick/bounds-of clip st sid n) frame)
|
||||
(when-let [source (node/source n)]
|
||||
(let [[w h] (clip/stage clip source)]
|
||||
[0 0 w h]))))))))))
|
||||
|
||||
(rf/reg-sub
|
||||
::selected-placement
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@
|
|||
(is (= :main sid))
|
||||
(is (= [5 6] (node/placed-span instance)))
|
||||
(is (= 1 (clip/frames saved source)))
|
||||
(is (= source (:sid (creation/target saved {} :main
|
||||
(get-in db [:ui :selection]) 5)))
|
||||
"an explicitly created cel is immediately its own creation target")
|
||||
(is (every? (fn [other]
|
||||
(or (= instance-id (:id other))
|
||||
(let [[a b] (node/placed-span other)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue