@flashist/appframework 0.0.87 → 0.0.89
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,10 +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
|
|
9
|
+
protected contentContReversedResizeSize: Rectangle;
|
|
10
10
|
protected contentContLocalPosOfGlobalZero: Point;
|
|
11
|
-
protected reversedScaleContentLocalPosCached: Point;
|
|
12
|
-
protected reversedScaleContentGlobalPosCached: Point;
|
|
13
11
|
protected construction(...args: any[]): void;
|
|
14
12
|
get sizeArea(): Rectangle;
|
|
15
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,10 +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.
|
|
37
|
+
this.contentContReversedResizeSize = new Rectangle();
|
|
36
38
|
this.contentContLocalPosOfGlobalZero = new Point();
|
|
37
|
-
this.reversedScaleContentLocalPosCached = new Point();
|
|
38
|
-
this.reversedScaleContentGlobalPosCached = new Point();
|
|
39
|
+
// this.reversedScaleContentLocalPosCached = new Point();
|
|
40
|
+
// this.reversedScaleContentGlobalPosCached = new Point();
|
|
39
41
|
this.contentCont = new FContainer();
|
|
40
42
|
this.addChild(this.contentCont);
|
|
41
43
|
this.contentCont.interactive = true;
|
|
@@ -84,19 +86,19 @@ var BasePageView = /** @class */ (function (_super) {
|
|
|
84
86
|
this.contentCont.scale.set(tempScale);
|
|
85
87
|
/*this.contentCont.x = this.sizeArea.x + Math.floor((this.resizeSize.x - this.contentCont.width) / 2);
|
|
86
88
|
this.contentCont.y = this.sizeArea.y + Math.floor((this.resizeSize.y - this.contentCont.height) / 2);*/
|
|
87
|
-
this.contentCont.x = Math.floor((this.resizeSize.x - (this.sizeArea.width * tempScale)) / 2);
|
|
88
|
-
this.contentCont.x -= Math.floor(this.sizeArea.x * tempScale);
|
|
89
|
-
this.contentCont.y = Math.floor((this.resizeSize.y - (this.sizeArea.height * tempScale)) / 2);
|
|
90
|
-
this.contentCont.y -= Math.floor(this.sizeArea.y * tempScale);
|
|
91
|
-
this.reversedScaleContentLocalPosCached.x = this.contentCont.x;
|
|
92
|
-
this.reversedScaleContentLocalPosCached.y = this.contentCont.y;
|
|
93
|
-
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);
|
|
94
96
|
//
|
|
95
97
|
this.contentCont.toLocal({ x: 0, y: 0 }, null, this.contentContLocalPosOfGlobalZero);
|
|
96
|
-
this.
|
|
97
|
-
this.
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
98
|
+
this.contentContReversedResizeSize.x = this.contentContLocalPosOfGlobalZero.x;
|
|
99
|
+
this.contentContReversedResizeSize.y = this.contentContLocalPosOfGlobalZero.y;
|
|
100
|
+
this.contentContReversedResizeSize.width = Math.floor(this.resizeSize.x / this.contentCont.scale.x);
|
|
101
|
+
this.contentContReversedResizeSize.height = Math.floor(this.resizeSize.y / this.contentCont.scale.y);
|
|
100
102
|
};
|
|
101
103
|
return BasePageView;
|
|
102
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,qEA+GC;QAzGa,mBAAa,GAAW,QAAQ,CAAC;QACjC,wBAAkB,GAAW,GAAG,CAAC;;IAwG/C,CAAC;
|
|
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,wBAA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