@leapfrog/interactive-canvas 2.0.22-beta-4 → 2.0.22-beta-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.
@@ -319,7 +319,7 @@ export declare abstract class AbstractInteractiveCanvas implements IInteractiveC
319
319
  * @override
320
320
  * @inheritDoc
321
321
  */
322
- createPNGStream(): any;
322
+ createPNGStream(multiplier?: number): any;
323
323
  /**
324
324
  * @override
325
325
  * @inheritDoc
@@ -3489,14 +3489,10 @@ class AbstractInteractiveCanvas {
3489
3489
  * @override
3490
3490
  * @inheritDoc
3491
3491
  */
3492
- createPNGStream() {
3493
- //return (this.fabricCanvas as any).createPNGStream();
3494
- const options = {
3495
- format: "png",
3496
- multiplier: 2,
3497
- enableRetinaScaling: true
3498
- };
3499
- return this.fabricCanvas.toDataURL(options);
3492
+ createPNGStream(multiplier) {
3493
+ ({
3494
+ multiplier: multiplier || this.IMAGE_CAPTURE_COEFFICIENT});
3495
+ return this.fabricCanvas.toDataURL();
3500
3496
  }
3501
3497
  /**
3502
3498
  * @override
@@ -302,7 +302,7 @@ export interface IInteractiveCanvas {
302
302
  /**
303
303
  * Create a PNG stream of the canvas. Only works on headless canvas.
304
304
  */
305
- createPNGStream(): any;
305
+ createPNGStream(multiplier?: number): any;
306
306
  /**
307
307
  * Save the current state as an undo point.
308
308
  */
@@ -3510,14 +3510,10 @@ class AbstractInteractiveCanvas {
3510
3510
  * @override
3511
3511
  * @inheritDoc
3512
3512
  */
3513
- createPNGStream() {
3514
- //return (this.fabricCanvas as any).createPNGStream();
3515
- const options = {
3516
- format: "png",
3517
- multiplier: 2,
3518
- enableRetinaScaling: true
3519
- };
3520
- return this.fabricCanvas.toDataURL(options);
3513
+ createPNGStream(multiplier) {
3514
+ ({
3515
+ multiplier: multiplier || this.IMAGE_CAPTURE_COEFFICIENT});
3516
+ return this.fabricCanvas.toDataURL();
3521
3517
  }
3522
3518
  /**
3523
3519
  * @override
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leapfrog/interactive-canvas",
3
- "version": "2.0.22-beta-4",
3
+ "version": "2.0.22-beta-6",
4
4
  "description": "Leapfrog interactive canvas",
5
5
  "files": [
6
6
  "dist"