@netless/telebox-insider 1.0.0-alpha.2 → 1.0.0-alpha.3
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/style.css +1 -1
- package/dist/telebox-insider.cjs.js +1 -1
- package/dist/telebox-insider.cjs.js.map +1 -1
- package/dist/telebox-insider.es.js +1 -1
- package/dist/telebox-insider.es.js.map +1 -1
- package/package.json +1 -1
- package/src/TeleBoxManager/index.ts +13 -17
- package/src/TeleStage/style.scss +1 -1
package/package.json
CHANGED
|
@@ -107,22 +107,15 @@ export class TeleBoxManager {
|
|
|
107
107
|
return () => void 0;
|
|
108
108
|
}
|
|
109
109
|
const observer = new ResizeObserver((entries) => {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
height: rect.height,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
50,
|
|
124
|
-
"root-resize-observer"
|
|
125
|
-
);
|
|
110
|
+
const rect = entries[0]?.contentRect;
|
|
111
|
+
if (rect) {
|
|
112
|
+
rootRect$.setValue({
|
|
113
|
+
x: rect.x,
|
|
114
|
+
y: rect.y,
|
|
115
|
+
width: rect.width,
|
|
116
|
+
height: rect.height,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
126
119
|
});
|
|
127
120
|
observer.observe(root);
|
|
128
121
|
return () => observer.disconnect();
|
|
@@ -207,7 +200,10 @@ export class TeleBoxManager {
|
|
|
207
200
|
rootRect$,
|
|
208
201
|
ratio$: stageRatio$,
|
|
209
202
|
root$,
|
|
210
|
-
highlightStage
|
|
203
|
+
highlightStage$: combine(
|
|
204
|
+
[highlightStage$, maximized$],
|
|
205
|
+
([highlightStage, maximized]) => highlightStage && !maximized
|
|
206
|
+
),
|
|
211
207
|
});
|
|
212
208
|
this._sideEffect.addDisposer(() => teleStage.destroy());
|
|
213
209
|
|