gridviz 2.1.0 → 2.1.2

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.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Visualization tool for gridded statistics",
5
5
  "keywords": [
6
6
  "statistics",
package/src/App.js CHANGED
@@ -162,7 +162,7 @@ export class App {
162
162
 
163
163
  //restore default alpha and blend operation
164
164
  this.cg.ctx.globalAlpha = 1.0
165
- this.cg.ctx.globalCompositeOperation = "normal"
165
+ this.cg.ctx.globalCompositeOperation = this.defaultGlobalCompositeOperation
166
166
  }
167
167
 
168
168
  //draw boundary layer
@@ -324,6 +324,9 @@ export class App {
324
324
 
325
325
  //
326
326
  //canvas.addEventListener("keydown", e => { console.log(arguments) });
327
+
328
+ //set default globalCompositeOperation
329
+ this.defaultGlobalCompositeOperation = opts.defaultGlobalCompositeOperation || this.cg.ctx.globalCompositeOperation;
327
330
  }
328
331
 
329
332
  /**
@@ -36,7 +36,7 @@ export class PillarStyle extends Style {
36
36
  this.width = opts.width || ((v, r) => 0.5 * r)
37
37
 
38
38
  /** @type {boolean} */
39
- this.simple = opts.simple != undefined
39
+ this.simple = opts.simple == true
40
40
 
41
41
  /** @type {number} */
42
42
  this.viewHeightFactor = opts.viewHeightFactor || 1.5