mol_plot_all 1.2.873 → 1.2.875

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.mjs CHANGED
@@ -215,18 +215,16 @@ var $;
215
215
  return this.toString();
216
216
  }
217
217
  static toString() {
218
- if (Symbol.toStringTag in this)
219
- return this[Symbol.toStringTag];
220
- return this.name;
218
+ return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
219
+ }
220
+ static toJSON() {
221
+ return this.toString();
221
222
  }
222
223
  destructor() { }
223
224
  static destructor() { }
224
225
  toString() {
225
226
  return this[Symbol.toStringTag] || this.constructor.name + '<>';
226
227
  }
227
- static toJSON() {
228
- return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
229
- }
230
228
  toJSON() {
231
229
  return this.toString();
232
230
  }
@@ -2233,7 +2231,7 @@ var $;
2233
2231
  }
2234
2232
  }
2235
2233
  dom_id() {
2236
- return this.toString();
2234
+ return this.toString().replace(/</g, '(').replace(/>/g, ')');
2237
2235
  }
2238
2236
  dom_node_external(next) {
2239
2237
  const node = next ?? $mol_dom_context.document.createElementNS(this.dom_name_space(), this.dom_name());
@@ -2510,6 +2508,9 @@ var $;
2510
2508
  __decorate([
2511
2509
  $mol_mem
2512
2510
  ], $mol_view.prototype, "view_rect", null);
2511
+ __decorate([
2512
+ $mol_memo.method
2513
+ ], $mol_view.prototype, "dom_id", null);
2513
2514
  __decorate([
2514
2515
  $mol_mem
2515
2516
  ], $mol_view.prototype, "dom_node", null);
package/web.test.js CHANGED
@@ -2240,8 +2240,8 @@ var $;
2240
2240
  $mol_mem_key
2241
2241
  ], $mol_view_test_block.prototype, "element", null);
2242
2242
  var x = $mol_view_test_block.Root(0);
2243
- $mol_assert_equal(x.dom_node().id, '$mol_view_test_block.Root<0>');
2244
- $mol_assert_equal(x.element(0).dom_node().id, '$mol_view_test_block.Root<0>.element<0>');
2243
+ $mol_assert_equal(x.dom_node().id, '$mol_view_test_block.Root(0)');
2244
+ $mol_assert_equal(x.element(0).dom_node().id, '$mol_view_test_block.Root(0).element(0)');
2245
2245
  },
2246
2246
  'caching ref to dom node'($) {
2247
2247
  var x = new class extends $mol_view {