mol_plot_all 1.2.236 → 1.2.239

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/web.esm.js CHANGED
@@ -1257,17 +1257,27 @@ var $;
1257
1257
  };
1258
1258
  }
1259
1259
  }
1260
- recall(...args) {
1261
- if (this.cursor > $mol_wire_cursor.fresh) {
1262
- try {
1263
- this.once();
1264
- }
1265
- catch (error) {
1266
- if (error instanceof Promise)
1267
- $mol_fail_hidden(error);
1268
- }
1260
+ resync(...args) {
1261
+ let res;
1262
+ try {
1263
+ res = this.recall(...args);
1264
+ }
1265
+ catch (error) {
1266
+ if (error instanceof Promise)
1267
+ $mol_fail_hidden(error);
1268
+ res = error;
1269
+ }
1270
+ try {
1271
+ this.once();
1269
1272
  }
1270
- return this.put(this.task.call(this.host, ...args));
1273
+ catch (error) {
1274
+ if (error instanceof Promise)
1275
+ $mol_fail_hidden(error);
1276
+ }
1277
+ return this.put(res);
1278
+ }
1279
+ recall(...args) {
1280
+ return this.task.call(this.host, ...args);
1271
1281
  }
1272
1282
  once() {
1273
1283
  return this.sync();
@@ -1313,6 +1323,9 @@ var $;
1313
1323
  return next;
1314
1324
  }
1315
1325
  }
1326
+ __decorate([
1327
+ $mol_wire_method
1328
+ ], $mol_wire_atom.prototype, "resync", null);
1316
1329
  __decorate([
1317
1330
  $mol_wire_method
1318
1331
  ], $mol_wire_atom.prototype, "recall", null);
@@ -1360,7 +1373,7 @@ var $;
1360
1373
  return atom.sync();
1361
1374
  }
1362
1375
  }
1363
- return atom.recall(...args);
1376
+ return atom.resync(...args);
1364
1377
  };
1365
1378
  Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
1366
1379
  Object.assign(wrapper, { orig: func });
@@ -2116,7 +2129,16 @@ var $;
2116
2129
  function $mol_view_watch() {
2117
2130
  new $mol_after_frame($mol_view_watch);
2118
2131
  for (const view of $mol_view.watchers) {
2119
- view.view_rect_cache(view.dom_node().getBoundingClientRect().toJSON());
2132
+ const prev = view.view_rect_cache();
2133
+ const next = view.dom_node().getBoundingClientRect();
2134
+ if (next.left === 0 && next.right === 0 && next.width === 0) {
2135
+ if (prev)
2136
+ view.view_rect_cache(null);
2137
+ continue;
2138
+ }
2139
+ if (!prev || prev.x !== next.x || prev.y !== next.y || prev.width !== next.width || prev.height !== next.height) {
2140
+ view.view_rect_cache(next);
2141
+ }
2120
2142
  }
2121
2143
  }
2122
2144
  $mol_view_watch();