@awayjs/scene
Version:
AwayJS scene classes
39 lines (38 loc) • 1.22 kB
JavaScript
import { __extends } from "tslib";
import { EventBase } from '@awayjs/core';
var ResizeEvent = /** @class */ (function (_super) {
__extends(ResizeEvent, _super);
function ResizeEvent(type, oldHeight, oldWidth) {
if (oldHeight === void 0) { oldHeight = NaN; }
if (oldWidth === void 0) { oldWidth = NaN; }
var _this = _super.call(this, type) || this;
_this._oldHeight = oldHeight;
_this._oldWidth = oldWidth;
return _this;
}
Object.defineProperty(ResizeEvent.prototype, "oldHeight", {
get: function () {
return this._oldHeight;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ResizeEvent.prototype, "oldWidth", {
get: function () {
return this._oldWidth;
},
enumerable: false,
configurable: true
});
/**
* Clones the event.
*
* @return An exact duplicate of the current object.
*/
ResizeEvent.prototype.clone = function () {
return new ResizeEvent(this.type, this._oldHeight, this._oldWidth);
};
ResizeEvent.RESIZE = 'resize';
return ResizeEvent;
}(EventBase));
export { ResizeEvent };