gridviz 2.0.43 → 2.0.44

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": "gridviz",
3
- "version": "2.0.43",
3
+ "version": "2.0.44",
4
4
  "description": "Visualization tool for gridded statistics",
5
5
  "keywords": [
6
6
  "statistics",
package/src/App.js CHANGED
@@ -186,7 +186,7 @@ export class App {
186
186
  this.legendDivId = opts.legendDivId || 'gvizLegend'
187
187
  this.legend = select('#' + this.legendDivId)
188
188
  if (this.legend.empty()) {
189
- this.legend = select(container.id && container.id !== '' ? '#' + container.id : 'body')
189
+ this.legend = select(container.id && container.id != '' ? '#' + container.id : 'body')
190
190
  .append('div')
191
191
  .attr('id', this.legendDivId)
192
192
  .style('position', 'absolute')
package/src/Tooltip.js CHANGED
@@ -52,7 +52,11 @@ export class Tooltip {
52
52
  * @type {import("d3-selection").Selection} */
53
53
  this.tooltip = select('#' + this.div)
54
54
  if (this.tooltip.empty())
55
- this.tooltip = select('#' + this.parentElement.id)
55
+ this.tooltip = select(
56
+ '#' + this.parentElement.id && this.parentElement.id != ''
57
+ ? '#' + this.parentElement.id
58
+ : 'body'
59
+ )
56
60
  .append('div')
57
61
  .attr('id', this.div)
58
62