Handle case where bitmap does not have an x/y

This commit is contained in:
Jordan Eldredge 2021-06-28 20:31:49 -07:00
parent 02cbf94fe8
commit f5565e74c2

View file

@ -89,8 +89,8 @@ export default class Bitmap {
}
getBackgrondPositionCSSAttribute(): string {
const x = Utils.px(-this._x);
const y = Utils.px(-this._y);
const x = Utils.px(-(this._x ?? 0));
const y = Utils.px(-(this._y ?? 0));
return `${x} ${y}`;
}