mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
fix offsets
This commit is contained in:
parent
935805fe1f
commit
17a37aa06c
1 changed files with 4 additions and 3 deletions
|
@ -90,11 +90,12 @@ function getImageUrl(img) {
|
||||||
return `/gen-img/events/${img}.png`
|
return `/gen-img/events/${img}.png`
|
||||||
}
|
}
|
||||||
function getImageData(img) {
|
function getImageData(img) {
|
||||||
|
const offsets = genImagesOffsets[img];
|
||||||
return Object.assign({}, genImages[img], {
|
return Object.assign({}, genImages[img], {
|
||||||
src: `/gen-img/events/${img}.png`,
|
src: `/gen-img/events/${img}.png`,
|
||||||
offsets: genImagesOffsets[img],
|
offsets,
|
||||||
calcObjOffsets: function (tp) {
|
calcObjOffsets: function (tp) {
|
||||||
const co = image.offsets?.[tp];
|
const co = offsets?.[tp];
|
||||||
if (!co) {
|
if (!co) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -102,7 +103,7 @@ function getImageData(img) {
|
||||||
},
|
},
|
||||||
calcBgOffsets: function(tp) {
|
calcBgOffsets: function(tp) {
|
||||||
const arr = [];
|
const arr = [];
|
||||||
const co = image.offsets?.[tp];
|
const co = offsets?.[tp];
|
||||||
if (!co) {
|
if (!co) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue