@netless/window-manager 1.0.0-canary.54 → 1.0.0-canary.55
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/dist/index.cjs.js +1 -7
- package/dist/index.es.js +1 -7
- package/dist/index.umd.js +1 -7
- package/package.json +1 -1
- package/src/AppManager.ts +0 -1
- package/src/View/ScrollMode.ts +1 -11
package/dist/index.cjs.js
CHANGED
@@ -2508,12 +2508,6 @@ class ScrollMode {
|
|
2508
2508
|
this.sideEffect.addEventListener(el.parentElement, "wheel", this.onWheel, { capture: true, passive: false }, "wheel");
|
2509
2509
|
}
|
2510
2510
|
}));
|
2511
|
-
this.sideEffect.push(scale$.reaction((scale2) => {
|
2512
|
-
if (scale2 > 0) {
|
2513
|
-
this.sideEffect.flush("initScroll");
|
2514
|
-
this.sideEffect.setTimeout(this.initScroll, 0);
|
2515
|
-
}
|
2516
|
-
}), "initScroll");
|
2517
2511
|
const maxScrollPage$ = valueEnhancer.combine([this._size$, this._scale$], ([size, scale2]) => {
|
2518
2512
|
const halfWbHeight = size.height / 2 / scale2;
|
2519
2513
|
return (this.baseHeight - halfWbHeight) / halfWbHeight / 2 - 0.51;
|
@@ -2527,6 +2521,7 @@ class ScrollMode {
|
|
2527
2521
|
});
|
2528
2522
|
this.updateScroll(scrollTop$.value);
|
2529
2523
|
this.sideEffect.push(this.scrollState$.subscribe((state) => callbacks.emit("scrollStateChange", state)));
|
2524
|
+
this.initScroll();
|
2530
2525
|
}
|
2531
2526
|
setRoot(root) {
|
2532
2527
|
this._root$.setValue(root);
|
@@ -3085,7 +3080,6 @@ class AppManager {
|
|
3085
3080
|
bindMainView(divElement, disableCameraTransform) {
|
3086
3081
|
const mainView = this.mainViewProxy.view;
|
3087
3082
|
mainView.disableCameraTransform = disableCameraTransform;
|
3088
|
-
console.log("bindMainView", mainView.disableCameraTransform);
|
3089
3083
|
wait(30).then(() => {
|
3090
3084
|
mainView.divElement = divElement;
|
3091
3085
|
emitter.emit("mainViewMounted");
|
package/dist/index.es.js
CHANGED
@@ -2501,12 +2501,6 @@ class ScrollMode {
|
|
2501
2501
|
this.sideEffect.addEventListener(el.parentElement, "wheel", this.onWheel, { capture: true, passive: false }, "wheel");
|
2502
2502
|
}
|
2503
2503
|
}));
|
2504
|
-
this.sideEffect.push(scale$.reaction((scale2) => {
|
2505
|
-
if (scale2 > 0) {
|
2506
|
-
this.sideEffect.flush("initScroll");
|
2507
|
-
this.sideEffect.setTimeout(this.initScroll, 0);
|
2508
|
-
}
|
2509
|
-
}), "initScroll");
|
2510
2504
|
const maxScrollPage$ = combine([this._size$, this._scale$], ([size, scale2]) => {
|
2511
2505
|
const halfWbHeight = size.height / 2 / scale2;
|
2512
2506
|
return (this.baseHeight - halfWbHeight) / halfWbHeight / 2 - 0.51;
|
@@ -2520,6 +2514,7 @@ class ScrollMode {
|
|
2520
2514
|
});
|
2521
2515
|
this.updateScroll(scrollTop$.value);
|
2522
2516
|
this.sideEffect.push(this.scrollState$.subscribe((state) => callbacks.emit("scrollStateChange", state)));
|
2517
|
+
this.initScroll();
|
2523
2518
|
}
|
2524
2519
|
setRoot(root) {
|
2525
2520
|
this._root$.setValue(root);
|
@@ -3078,7 +3073,6 @@ class AppManager {
|
|
3078
3073
|
bindMainView(divElement, disableCameraTransform) {
|
3079
3074
|
const mainView = this.mainViewProxy.view;
|
3080
3075
|
mainView.disableCameraTransform = disableCameraTransform;
|
3081
|
-
console.log("bindMainView", mainView.disableCameraTransform);
|
3082
3076
|
wait(30).then(() => {
|
3083
3077
|
mainView.divElement = divElement;
|
3084
3078
|
emitter.emit("mainViewMounted");
|
package/dist/index.umd.js
CHANGED
@@ -2501,12 +2501,6 @@ var __objRest = (source, exclude) => {
|
|
2501
2501
|
this.sideEffect.addEventListener(el.parentElement, "wheel", this.onWheel, { capture: true, passive: false }, "wheel");
|
2502
2502
|
}
|
2503
2503
|
}));
|
2504
|
-
this.sideEffect.push(scale$.reaction((scale2) => {
|
2505
|
-
if (scale2 > 0) {
|
2506
|
-
this.sideEffect.flush("initScroll");
|
2507
|
-
this.sideEffect.setTimeout(this.initScroll, 0);
|
2508
|
-
}
|
2509
|
-
}), "initScroll");
|
2510
2504
|
const maxScrollPage$ = valueEnhancer.combine([this._size$, this._scale$], ([size, scale2]) => {
|
2511
2505
|
const halfWbHeight = size.height / 2 / scale2;
|
2512
2506
|
return (this.baseHeight - halfWbHeight) / halfWbHeight / 2 - 0.51;
|
@@ -2520,6 +2514,7 @@ var __objRest = (source, exclude) => {
|
|
2520
2514
|
});
|
2521
2515
|
this.updateScroll(scrollTop$.value);
|
2522
2516
|
this.sideEffect.push(this.scrollState$.subscribe((state) => callbacks.emit("scrollStateChange", state)));
|
2517
|
+
this.initScroll();
|
2523
2518
|
}
|
2524
2519
|
setRoot(root) {
|
2525
2520
|
this._root$.setValue(root);
|
@@ -3078,7 +3073,6 @@ var __objRest = (source, exclude) => {
|
|
3078
3073
|
bindMainView(divElement, disableCameraTransform) {
|
3079
3074
|
const mainView = this.mainViewProxy.view;
|
3080
3075
|
mainView.disableCameraTransform = disableCameraTransform;
|
3081
|
-
console.log("bindMainView", mainView.disableCameraTransform);
|
3082
3076
|
wait(30).then(() => {
|
3083
3077
|
mainView.divElement = divElement;
|
3084
3078
|
emitter.emit("mainViewMounted");
|
package/package.json
CHANGED
package/src/AppManager.ts
CHANGED
@@ -597,7 +597,6 @@ export class AppManager {
|
|
597
597
|
public bindMainView(divElement: HTMLDivElement, disableCameraTransform: boolean) {
|
598
598
|
const mainView = this.mainViewProxy.view;
|
599
599
|
mainView.disableCameraTransform = disableCameraTransform;
|
600
|
-
console.log("bindMainView", mainView.disableCameraTransform);
|
601
600
|
// 延迟挂载 mainView 的 dom, 避免因为同步 camera 的闪动
|
602
601
|
wait(30).then(() => {
|
603
602
|
mainView.divElement = divElement;
|
package/src/View/ScrollMode.ts
CHANGED
@@ -129,17 +129,6 @@ export class ScrollMode {
|
|
129
129
|
})
|
130
130
|
);
|
131
131
|
|
132
|
-
this.sideEffect.push(
|
133
|
-
scale$.reaction(scale => {
|
134
|
-
if (scale > 0) {
|
135
|
-
this.sideEffect.flush("initScroll");
|
136
|
-
// XXX: wait window-manager's sync behavior then we reset the camera
|
137
|
-
this.sideEffect.setTimeout(this.initScroll, 0);
|
138
|
-
}
|
139
|
-
}),
|
140
|
-
"initScroll"
|
141
|
-
);
|
142
|
-
|
143
132
|
const maxScrollPage$ = combine([this._size$, this._scale$], ([size, scale]) => {
|
144
133
|
const halfWbHeight = size.height / 2 / scale;
|
145
134
|
return (this.baseHeight - halfWbHeight) / halfWbHeight / 2 - 0.51;
|
@@ -160,6 +149,7 @@ export class ScrollMode {
|
|
160
149
|
this.sideEffect.push(
|
161
150
|
this.scrollState$.subscribe(state => callbacks.emit("scrollStateChange", state))
|
162
151
|
);
|
152
|
+
this.initScroll();
|
163
153
|
}
|
164
154
|
|
165
155
|
private initScroll = (): void => {
|