mol_plot_all 1.2.259 → 1.2.260

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": "mol_plot_all",
3
- "version": "1.2.259",
3
+ "version": "1.2.260",
4
4
  "main": "node.js",
5
5
  "module": "node.esm.js",
6
6
  "browser": "web.js",
package/web.test.js CHANGED
@@ -226,7 +226,7 @@ var $;
226
226
  function $mol_jsx(Elem, props, ...childNodes) {
227
227
  const id = props && props.id || '';
228
228
  const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
229
- const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id}`) : $.$mol_jsx_crumbs;
229
+ const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
230
230
  if (Elem && $.$mol_jsx_booked) {
231
231
  if ($.$mol_jsx_booked.has(id)) {
232
232
  $mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
@@ -302,7 +302,11 @@ var $;
302
302
  $mol_dom_render_children(node, [].concat(...childNodes));
303
303
  if (!Elem)
304
304
  return node;
305
+ if (guid)
306
+ node.id = guid;
305
307
  for (const key in props) {
308
+ if (key === 'id')
309
+ continue;
306
310
  if (typeof props[key] === 'string') {
307
311
  ;
308
312
  node.setAttribute(key, props[key]);
@@ -319,8 +323,6 @@ var $;
319
323
  node[key] = props[key];
320
324
  }
321
325
  }
322
- if (guid)
323
- node.id = guid;
324
326
  if ($.$mol_jsx_crumbs)
325
327
  node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
326
328
  return node;