@netless/telebox-insider 0.2.30 → 0.2.31

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/telebox-insider",
3
- "version": "0.2.30",
3
+ "version": "0.2.31",
4
4
  "private": false,
5
5
  "description": "Window widget for Whiteboard",
6
6
  "author": "CRIMX <straybugs@gmail.com> (https://github.com/crimx/)",
@@ -178,6 +178,11 @@ export class TeleBox {
178
178
  const collectorRect$ = createVal(collectorRect, shallowequal);
179
179
 
180
180
  const title$ = createVal(title);
181
+ title$.reaction((title, _, skipUpdate) => {
182
+ if (!skipUpdate) {
183
+ this.titleBar.setTitle(title);
184
+ }
185
+ });
181
186
 
182
187
  const visible$ = createVal(visible);
183
188
  visible$.reaction((visible, _, skipUpdate) => {
@@ -849,7 +854,11 @@ export class TeleBox {
849
854
 
850
855
  this._renderSideEffect.add(() =>
851
856
  this._visible$.subscribe((visible) => {
852
- this.$box.style.display = visible ? "block" : "none";
857
+ if (visible) {
858
+ this.$box.style.removeProperty("display");
859
+ } else {
860
+ this.$box.style.display = "none";
861
+ }
853
862
  })
854
863
  );
855
864