0.5.6: show/hide locked tracks + group lock + crop/mask-preview split

- Timeline: new show/hide toggle next to snap; locked tracks (including
  layer, clip, and the new group lock) are filtered from the timeline
  when the toggle is off. Preference lives in localStorage and is
  shared across components via a module-level ref.
- Groups become lockable via the same inline lock toggle. A locked
  group propagates to its children: they behave as effectively locked
  in the timeline and on the stage. Collapse/expand still works on a
  locked group.
- Canvas: layers in locked+hidden tracks render as a 1px outline in
  the layer (or fill) color instead of their full fill, and are
  draggable:false / listening:false. Mask layers keep their dashed
  ghost styling; masks still apply in the preview overlay regardless
  of lock or show state.
- drawSceneFrame gains an optional `{ crop }` option; the mask-preview
  overlay passes the editor's crop toggle through, so the two controls
  are fully independent. Crop changes now also trigger a preview
  redraw via a watcher dep.
- Tests: new suites for show-locked persistence, group lock store
  action, crop option on drawSceneFrame (including mask+crop combos).
  Properties transparent-toggle tests now reset the section prefs
  localStorage so the Appearance section is guaranteed open when the
  panel mounts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.7 committed 2026-04-20 16:42:39 +02:00
1 parent 63042b284d
commit 69de48ea8d
10 files changed
+522 -35

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { ref, watch } from 'vue'
const KEY = 'animatr:showLockedTracks'
function read(): boolean {
try {
const v = localStorage.getItem(KEY)
return v === null ? true : v === '1'
} catch {
return true
}
}
// Module-level shared ref so Timeline, CanvasStage and anything else can
// observe the same "show locked tracks" preference.
export const showLocked = ref(read())
watch(showLocked, (v) => {
try {
localStorage.setItem(KEY, v ? '1' : '0')
} catch {
/* ignore */
}
})