"use strict";
cc._RF.push(module, 'c3e24Nrpq5OJr1Xmjm0kH1N', 'common');
// Script/common.ts

// Learn TypeScript:
//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/typescript.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
//  - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    // LIFE-CYCLE CALLBACKS:
    NewClass.prototype.onLoad = function () {
        var canvas = this.canvas;
        var designResolution = canvas.designResolution;
        var viewSize = cc.view.getFrameSize();
        console.log("winsize", viewSize.width, viewSize.height);
        console.log("designResolution", designResolution.width, designResolution.height);
        console.log("canvas", canvas, canvas.fitWidth, canvas.fitHeight);
        if (viewSize.width / viewSize.height > designResolution.width / designResolution.height) {
            canvas.fitHeight = true;
        }
        else {
            canvas.fitWidth = true;
        }
    };
    NewClass.prototype.start = function () {
    };
    __decorate([
        property(cc.Canvas)
    ], NewClass.prototype, "canvas", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();