gridviz 3.0.5 → 3.0.6

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": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "Visualization tool for gridded statistics",
5
5
  "keywords": [
6
6
  "statistics",
@@ -42,9 +42,9 @@ export class Legend {
42
42
  /** @type {string} @deprecated */
43
43
  this['font-family'] = opts['font-family'] || 'Helvetica, Arial, sans-serif'
44
44
  /** @type {string} @deprecated */
45
- this.width = opts.width
45
+ //this.width = opts.width
46
46
  /** @type {string} @deprecated */
47
- this.height = opts.height
47
+ //this.height = opts.height
48
48
 
49
49
  //the div element
50
50
  if (this.id) this.div = select('#' + this.id)
@@ -62,9 +62,8 @@ export class Legend {
62
62
  this.div.style('box-shadow', this['box-shadow'])
63
63
  this.div.style('font-family', this['font-family'])
64
64
 
65
- if (this.width) this.div.style('width', this.width)
66
- if (this.height) this.div.style('height', this.height)
67
-
65
+ //if (this.width) this.div.style('width', this.width)
66
+ //if (this.height) this.div.style('height', this.height)
68
67
 
69
68
  //title
70
69
  this.title = opts.title
@@ -93,9 +92,10 @@ export class Legend {
93
92
  * Apply a style to the legend div.
94
93
  * @param {string} k
95
94
  * @param {string} v
96
- * @returns {this}
95
+ * @returns {this|string}
97
96
  */
98
97
  style(k, v) {
98
+ if (arguments.length == 1) return this.div.style(k)
99
99
  this.div.style(k, v)
100
100
  return this
101
101
  }