- and = are on the bar for a drawing, not a lane
With a lane's row selected they lengthened the whole lane, which is not what holding a drawing longer means. They show for a cel or a symbol, and not for the row that places a lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011FLuCjp9kNH6ovwJVXSbq9
This commit is contained in:
parent
796bb9ae6b
commit
571e80d975
1 changed files with 13 additions and 2 deletions
|
|
@ -540,12 +540,23 @@
|
||||||
[delta]
|
[delta]
|
||||||
(fn [db] (when-let [p (ui/span-path db)] [::ui/slide p delta :out true])))
|
(fn [db] (when-let [p (ui/span-path db)] [::ui/slide p delta :out true])))
|
||||||
|
|
||||||
|
(defn- places-lane?
|
||||||
|
"Does the row at `path` in the open symbol place a lane? Holding a lane
|
||||||
|
longer is not lengthening a drawing, which is what = and − are on the bar for."
|
||||||
|
[db path]
|
||||||
|
(let [{document :clip st :store} (store/entry (:clip/current db))
|
||||||
|
f (ui/editing-frame db document)
|
||||||
|
host (nest/inside document st (get-in db [:ui :open]) (pop path) f)
|
||||||
|
n (get-in document [:symbols (:sid host) :nodes (peek path)])]
|
||||||
|
(boolean (some->> (node/source n) (clip/symbol document) symbol/lane?))))
|
||||||
|
|
||||||
(rf/reg-sub
|
(rf/reg-sub
|
||||||
::here
|
::here
|
||||||
;; Which of the toolbar's commands mean something for the selection right now.
|
;; Which of the toolbar's commands mean something for the selection right now.
|
||||||
(fn [db _]
|
(fn [db _]
|
||||||
{:lane? (some? (ui/lane-here db))
|
(let [p (ui/span-path db)]
|
||||||
:span? (some? (ui/span-path db))}))
|
{:lane? (some? (ui/lane-here db))
|
||||||
|
:span? (and (some? p) (not (places-lane? db p)))})))
|
||||||
|
|
||||||
;; ---------------------------------------------------------------------------
|
;; ---------------------------------------------------------------------------
|
||||||
;; the panes
|
;; the panes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue