this._damage(x, y, img.width, img.height);
},
- changeCursor: function (pixels, mask, hotx, hoty, w, h) {
- Display.changeCursor(this._target, pixels, mask, hotx, hoty, w, h);
- },
-
- defaultCursor: function () {
- this._target.style.cursor = "default";
- },
-
- disableLocalCursor: function () {
- this._target.style.cursor = "none";
- },
-
autoscale: function (containerWidth, containerHeight) {
- var vp = this._viewportLoc;
- var targetAspectRatio = containerWidth / containerHeight;
- var fbAspectRatio = vp.w / vp.h;
+ const vp = this._viewportLoc;
+ const targetAspectRatio = containerWidth / containerHeight;
+ const fbAspectRatio = vp.w / vp.h;
- var scaleRatio;
+ let scaleRatio;
if (fbAspectRatio >= targetAspectRatio) {
scaleRatio = containerWidth / vp.w;
} else {