squarified 0.3.1 → 0.3.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/dist/index.js CHANGED
@@ -763,6 +763,9 @@ class RenderCache extends Canvas {
763
763
  resetLayout(treemap, width * a, height * d);
764
764
  drawGraphIntoCanvas(treemap, { c: this.canvas, ctx: this.ctx, dpr: devicePixelRatio });
765
765
  this.$memory = true;
766
+ if (this.ctx.isContextLost()) {
767
+ this.$memory = false;
768
+ }
766
769
  }
767
770
  destroy() {
768
771
  this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
@@ -1172,9 +1175,6 @@ class TreemapEvent extends DOMEvent {
1172
1175
  }
1173
1176
  onwheel(ctx, metadata) {
1174
1177
  ctx.treemap.renderCache.destroy();
1175
- this.silent("mousedown");
1176
- this.exposedEvent.silent("mousemove");
1177
- this.silent("mousemove");
1178
1178
  const { native } = metadata;
1179
1179
  const { treemap } = ctx;
1180
1180
  const wheelDelta = native.wheelDelta;
@@ -1191,6 +1191,11 @@ class TreemapEvent extends DOMEvent {
1191
1191
  const translateX = offsetX - (offsetX - this.matrix.e) * delta;
1192
1192
  const translateY = offsetY - (offsetY - this.matrix.f) * delta;
1193
1193
  runEffect((progress, cleanup) => {
1194
+ this.silent("mousedown");
1195
+ this.exposedEvent.silent("mousemove");
1196
+ this.silent("mousemove");
1197
+ this.silent("click");
1198
+ this.exposedEvent.silent("click");
1194
1199
  cleanup();
1195
1200
  treemap.highlight.reset();
1196
1201
  treemap.highlight.setZIndexForHighlight();
@@ -1216,6 +1221,8 @@ class TreemapEvent extends DOMEvent {
1216
1221
  this.active("mousedown");
1217
1222
  this.active("mousemove");
1218
1223
  this.exposedEvent.active("mousemove");
1224
+ this.active("click");
1225
+ this.exposedEvent.active("click");
1219
1226
  }
1220
1227
  });
1221
1228
  }
package/dist/index.mjs CHANGED
@@ -761,6 +761,9 @@ class RenderCache extends Canvas {
761
761
  resetLayout(treemap, width * a, height * d);
762
762
  drawGraphIntoCanvas(treemap, { c: this.canvas, ctx: this.ctx, dpr: devicePixelRatio });
763
763
  this.$memory = true;
764
+ if (this.ctx.isContextLost()) {
765
+ this.$memory = false;
766
+ }
764
767
  }
765
768
  destroy() {
766
769
  this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
@@ -1170,9 +1173,6 @@ class TreemapEvent extends DOMEvent {
1170
1173
  }
1171
1174
  onwheel(ctx, metadata) {
1172
1175
  ctx.treemap.renderCache.destroy();
1173
- this.silent("mousedown");
1174
- this.exposedEvent.silent("mousemove");
1175
- this.silent("mousemove");
1176
1176
  const { native } = metadata;
1177
1177
  const { treemap } = ctx;
1178
1178
  const wheelDelta = native.wheelDelta;
@@ -1189,6 +1189,11 @@ class TreemapEvent extends DOMEvent {
1189
1189
  const translateX = offsetX - (offsetX - this.matrix.e) * delta;
1190
1190
  const translateY = offsetY - (offsetY - this.matrix.f) * delta;
1191
1191
  runEffect((progress, cleanup) => {
1192
+ this.silent("mousedown");
1193
+ this.exposedEvent.silent("mousemove");
1194
+ this.silent("mousemove");
1195
+ this.silent("click");
1196
+ this.exposedEvent.silent("click");
1192
1197
  cleanup();
1193
1198
  treemap.highlight.reset();
1194
1199
  treemap.highlight.setZIndexForHighlight();
@@ -1214,6 +1219,8 @@ class TreemapEvent extends DOMEvent {
1214
1219
  this.active("mousedown");
1215
1220
  this.active("mousemove");
1216
1221
  this.exposedEvent.active("mousemove");
1222
+ this.active("click");
1223
+ this.exposedEvent.active("click");
1217
1224
  }
1218
1225
  });
1219
1226
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarified",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "squarified tree map",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",