@flashist/appframework 0.0.86 → 0.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,9 +6,8 @@ export declare class BasePageView extends BaseAppView {
|
|
|
6
6
|
protected sizeAreaColor: number;
|
|
7
7
|
protected sizeAreaColorAlpha: number;
|
|
8
8
|
protected contentCont: FContainer;
|
|
9
|
-
protected
|
|
10
|
-
protected
|
|
11
|
-
protected reversedScaleContentGlobalPosCached: Point;
|
|
9
|
+
protected reversedScaleContentContResizeSizeRect: Rectangle;
|
|
10
|
+
protected contentContLocalPosOfGlobalZero: Point;
|
|
12
11
|
protected construction(...args: any[]): void;
|
|
13
12
|
get sizeArea(): Rectangle;
|
|
14
13
|
set sizeArea(value: Rectangle);
|
|
@@ -25,6 +25,8 @@ var BasePageView = /** @class */ (function (_super) {
|
|
|
25
25
|
_this.sizeAreaColorAlpha = 0.5;
|
|
26
26
|
return _this;
|
|
27
27
|
}
|
|
28
|
+
// protected reversedScaleContentLocalPosCached: Point;
|
|
29
|
+
// protected reversedScaleContentGlobalPosCached: Point;
|
|
28
30
|
BasePageView.prototype.construction = function () {
|
|
29
31
|
var args = [];
|
|
30
32
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -32,9 +34,10 @@ var BasePageView = /** @class */ (function (_super) {
|
|
|
32
34
|
}
|
|
33
35
|
_super.prototype.construction.call(this, args);
|
|
34
36
|
// appState.app.config = getInstance(AppConfigModel);
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
37
|
+
this.reversedScaleContentContResizeSizeRect = new Rectangle();
|
|
38
|
+
this.contentContLocalPosOfGlobalZero = new Point();
|
|
39
|
+
// this.reversedScaleContentLocalPosCached = new Point();
|
|
40
|
+
// this.reversedScaleContentGlobalPosCached = new Point();
|
|
38
41
|
this.contentCont = new FContainer();
|
|
39
42
|
this.addChild(this.contentCont);
|
|
40
43
|
this.contentCont.interactive = true;
|
|
@@ -83,18 +86,19 @@ var BasePageView = /** @class */ (function (_super) {
|
|
|
83
86
|
this.contentCont.scale.set(tempScale);
|
|
84
87
|
/*this.contentCont.x = this.sizeArea.x + Math.floor((this.resizeSize.x - this.contentCont.width) / 2);
|
|
85
88
|
this.contentCont.y = this.sizeArea.y + Math.floor((this.resizeSize.y - this.contentCont.height) / 2);*/
|
|
86
|
-
this.contentCont.x = Math.floor((this.resizeSize.x - (this.sizeArea.width * tempScale)) / 2);
|
|
87
|
-
this.contentCont.x -= Math.floor(this.sizeArea.x * tempScale);
|
|
88
|
-
this.contentCont.y = Math.floor((this.resizeSize.y - (this.sizeArea.height * tempScale)) / 2);
|
|
89
|
-
this.contentCont.y -= Math.floor(this.sizeArea.y * tempScale);
|
|
90
|
-
this.reversedScaleContentLocalPosCached.x = this.contentCont.x;
|
|
91
|
-
this.reversedScaleContentLocalPosCached.y = this.contentCont.y;
|
|
92
|
-
this.contentCont.toGlobal(this.reversedScaleContentLocalPosCached, this.reversedScaleContentGlobalPosCached);
|
|
89
|
+
// this.contentCont.x = Math.floor((this.resizeSize.x - (this.sizeArea.width * tempScale)) / 2);
|
|
90
|
+
// this.contentCont.x -= Math.floor(this.sizeArea.x * tempScale);
|
|
91
|
+
// this.contentCont.y = Math.floor((this.resizeSize.y - (this.sizeArea.height * tempScale)) / 2);
|
|
92
|
+
// this.contentCont.y -= Math.floor(this.sizeArea.y * tempScale);
|
|
93
|
+
// this.reversedScaleContentLocalPosCached.x = this.contentCont.x;
|
|
94
|
+
// this.reversedScaleContentLocalPosCached.y = this.contentCont.y;
|
|
95
|
+
// this.contentCont.toGlobal(this.reversedScaleContentLocalPosCached, this.reversedScaleContentGlobalPosCached);
|
|
93
96
|
//
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
97
|
-
this.
|
|
97
|
+
this.contentCont.toLocal({ x: 0, y: 0 }, null, this.contentContLocalPosOfGlobalZero);
|
|
98
|
+
this.reversedScaleContentContResizeSizeRect.x = this.contentContLocalPosOfGlobalZero.x;
|
|
99
|
+
this.reversedScaleContentContResizeSizeRect.y = this.contentContLocalPosOfGlobalZero.y;
|
|
100
|
+
this.reversedScaleContentContResizeSizeRect.width = Math.floor(this.resizeSize.x / this.contentCont.scale.x);
|
|
101
|
+
this.reversedScaleContentContResizeSizeRect.height = Math.floor(this.resizeSize.y / this.contentCont.scale.y);
|
|
98
102
|
};
|
|
99
103
|
return BasePageView;
|
|
100
104
|
}(BaseAppView));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasePageView.js","sourceRoot":"","sources":["../../../src/pages/views/BasePageView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAe,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG1G,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD;IAAkC,gCAAW;IAA7C;QAEI,4CAA4C;QAFhD,
|
|
1
|
+
{"version":3,"file":"BasePageView.js","sourceRoot":"","sources":["../../../src/pages/views/BasePageView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAe,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG1G,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD;IAAkC,gCAAW;IAA7C;QAEI,4CAA4C;QAFhD,qEA+GC;QAzGa,mBAAa,GAAW,QAAQ,CAAC;QACjC,wBAAkB,GAAW,GAAG,CAAC;;IAwG/C,CAAC;IAlGG,uDAAuD;IACvD,wDAAwD;IAE9C,mCAAY,GAAtB;QAAuB,cAAO;aAAP,UAAO,EAAP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