mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 19:13:54 +00:00
Fix image lookups for animated layers (#928)
This commit is contained in:
parent
59281e056f
commit
baa83eed61
3 changed files with 6 additions and 5 deletions
|
|
@ -354,7 +354,7 @@ function animatedLayerOffsetAndSize(
|
|||
function AnimatedLayer({
|
||||
node,
|
||||
id,
|
||||
image,
|
||||
js_assets,
|
||||
x,
|
||||
y,
|
||||
w,
|
||||
|
|
@ -362,12 +362,12 @@ function AnimatedLayer({
|
|||
framewidth,
|
||||
frameheight,
|
||||
}) {
|
||||
if (image == null) {
|
||||
const img = js_assets.image;
|
||||
if (img == null) {
|
||||
console.warn("Got an AnimatedLayer without an image. Rendering null", id);
|
||||
return null;
|
||||
}
|
||||
|
||||
const img = node.js_imageLookup(image.toLowerCase());
|
||||
const frameNum = node.getcurframe();
|
||||
|
||||
let style = {};
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ async function prepareMakiImage(node, zip, file) {
|
|||
function imageAttributesFromNode(node) {
|
||||
if (!node.name) return [];
|
||||
switch (node.name.toLowerCase()) {
|
||||
case "layer": {
|
||||
case "layer":
|
||||
case "animatedlayer": {
|
||||
return ["image"];
|
||||
}
|
||||
case "layout": {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class AnimatedLayer extends Layer {
|
|||
return;
|
||||
}
|
||||
|
||||
const image = this.js_imageLookup(attributes.image);
|
||||
const image = attributes.js_assets.image;
|
||||
if (!image) {
|
||||
console.warn("Could not find image: ", attributes.image);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue