@flexem/fc-gui 3.0.0-alpha.39 → 3.0.0-alpha.40

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.
@@ -277,14 +277,15 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
277
277
  .style('text-anchor', 'middle')
278
278
  .style('font-size', fontSize)
279
279
  .text((d) => d);
280
- const h = this.rootElement
281
- .selectAll('.nv-focusWrap')
282
- .attr('transform')
283
- .slice(0, -1)
284
- .split(',')[1];
285
- this.rootElement
286
- .selectAll('.nv-focusWrap')
287
- .attr('transform', `translate(0,${Number(h) + 15})`);
280
+ const focusWrap = this.rootElement.selectAll('.nv-focusWrap');
281
+ if (focusWrap.size()) {
282
+ const h = focusWrap.attr('transform')
283
+ .slice(0, -1)
284
+ .split(',')[1];
285
+ this.rootElement
286
+ .selectAll('.nv-focusWrap')
287
+ .attr('transform', `translate(0,${Number(h) + 15})`);
288
+ }
288
289
  const resizeObserver = new window.MutationObserver(() => {
289
290
  this.rootElement
290
291
  .selectAll('.nv-x')
@@ -308,7 +309,10 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
308
309
  .style('font-size', fontSize)
309
310
  .text((d) => d);
310
311
  });
311
- resizeObserver.observe(document.getElementsByClassName('extent')[0], { attributes: true });
312
+ const extent = document.getElementsByClassName('extent');
313
+ if (extent.length) {
314
+ resizeObserver.observe(extent[0], { attributes: true });
315
+ }
312
316
  }
313
317
  else {
314
318
  this.rootElement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.39",
3
+ "version": "3.0.0-alpha.40",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",