fix offsets

This commit is contained in:
tree🌴 2024-03-16 20:55:28 +01:00
parent 935805fe1f
commit 17a37aa06c
1 changed files with 4 additions and 3 deletions

View File

@ -90,11 +90,12 @@ function getImageUrl(img) {
return `/gen-img/events/${img}.png`
}
function getImageData(img) {
const offsets = genImagesOffsets[img];
return Object.assign({}, genImages[img], {
src: `/gen-img/events/${img}.png`,
offsets: genImagesOffsets[img],
offsets,
calcObjOffsets: function (tp) {
const co = image.offsets?.[tp];
const co = offsets?.[tp];
if (!co) {
return '';
}
@ -102,7 +103,7 @@ function getImageData(img) {
},
calcBgOffsets: function(tp) {
const arr = [];
const co = image.offsets?.[tp];
const co = offsets?.[tp];
if (!co) {
return '';
}