tango-app-ui-store-builder 1.0.31 → 1.0.32

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.
@@ -14178,9 +14178,6 @@ class ManageStorePlanoComponent {
14178
14178
  ];
14179
14179
  this.canvas.setViewportTransform([1, 0, 0, 1, 0, 0]);
14180
14180
  const bounds = this.getFullLayoutBounds();
14181
- const bg = this.createExportLayoutBackground();
14182
- this.canvas.insertAt(0, bg);
14183
- this.canvas.renderAll();
14184
14181
  const dataURL = this.canvas.toDataURL({
14185
14182
  format: "png",
14186
14183
  left: bounds.left,
@@ -14189,14 +14186,38 @@ class ManageStorePlanoComponent {
14189
14186
  height: bounds.height,
14190
14187
  multiplier: 2,
14191
14188
  });
14192
- this.canvas.remove(bg);
14193
14189
  this.canvas.setViewportTransform(originalViewport);
14194
- this.canvas.renderAll();
14195
14190
  const link = document.createElement("a");
14196
14191
  link.href = dataURL;
14197
14192
  link.download = `${this.planoData.storeName}_${this.floorData.floorName}.png`;
14198
14193
  link.click();
14199
14194
  }
14195
+ // downloadCanvas() {
14196
+ // if (!this.canvas) return;
14197
+ // const originalViewport = [
14198
+ // ...this.canvas.viewportTransform!,
14199
+ // ] as fabric.TMat2D;
14200
+ // this.canvas.setViewportTransform([1, 0, 0, 1, 0, 0]);
14201
+ // const bounds = this.getFullLayoutBounds();
14202
+ // const bg = this.createExportLayoutBackground();
14203
+ // this.canvas.insertAt(0, bg);
14204
+ // this.canvas.renderAll();
14205
+ // const dataURL = this.canvas.toDataURL({
14206
+ // format: "png",
14207
+ // left: bounds.left,
14208
+ // top: bounds.top,
14209
+ // width: bounds.width,
14210
+ // height: bounds.height,
14211
+ // multiplier: 2,
14212
+ // });
14213
+ // this.canvas.remove(bg);
14214
+ // this.canvas.setViewportTransform(originalViewport);
14215
+ // this.canvas.renderAll();
14216
+ // const link = document.createElement("a");
14217
+ // link.href = dataURL;
14218
+ // link.download = `${this.planoData.storeName}_${this.floorData.floorName}.png`;
14219
+ // link.click();
14220
+ // }
14200
14221
  createExportLayoutBackground() {
14201
14222
  const points = this.buildLayoutPolygonFromWalls();
14202
14223
  return new fabric.Polygon(points, {
@@ -14541,8 +14562,7 @@ class ManageStorePlanoComponent {
14541
14562
  }
14542
14563
  return null;
14543
14564
  }
14544
- cancelEdit() {
14545
- }
14565
+ cancelEdit() { }
14546
14566
  listenToDeleteKey() {
14547
14567
  document.addEventListener("keydown", (e) => {
14548
14568
  if (e.key === "Delete" && this.layoutForm.enabled) {