Fix selection on later frames

This commit is contained in:
Skyler Lehmkuhl 2025-01-10 19:22:14 -05:00
parent 33212cb2ba
commit 2ce75df4d0
1 changed files with 2 additions and 1 deletions

View File

@ -2615,7 +2615,8 @@ class Layer extends Widget {
bbox() {
let bbox = super.bbox()
const frameInfo = this.getFrameValue(this.frameNum);
const frame = frameInfo.valueAtN
// TODO: if there are multiple layers we should only be counting valid frames
const frame = frameInfo.valueAtN ? frameInfo.valueAtN : frameInfo.prev
if (!frame) return bbox;
if (frame.shapes.length > 0 && bbox == undefined) {
bbox = structuredClone(frame.shapes[0].boundingBox);