Fix selection on later frames
This commit is contained in:
parent
33212cb2ba
commit
2ce75df4d0
|
|
@ -2615,7 +2615,8 @@ class Layer extends Widget {
|
||||||
bbox() {
|
bbox() {
|
||||||
let bbox = super.bbox()
|
let bbox = super.bbox()
|
||||||
const frameInfo = this.getFrameValue(this.frameNum);
|
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) return bbox;
|
||||||
if (frame.shapes.length > 0 && bbox == undefined) {
|
if (frame.shapes.length > 0 && bbox == undefined) {
|
||||||
bbox = structuredClone(frame.shapes[0].boundingBox);
|
bbox = structuredClone(frame.shapes[0].boundingBox);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue