@leapfrog/interactive-canvas 1.6.0 → 1.7.0

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.
@@ -276,7 +276,7 @@ export declare abstract class AbstractInteractiveCanvas implements IInteractiveC
276
276
  * @override
277
277
  * @inheritDoc
278
278
  */
279
- toImage(): string;
279
+ toImage(multiplier?: number): string;
280
280
  /**
281
281
  * @override
282
282
  * @inheritDoc
@@ -3093,11 +3093,11 @@ var AbstractInteractiveCanvas = /** @class */ (function () {
3093
3093
  * @override
3094
3094
  * @inheritDoc
3095
3095
  */
3096
- AbstractInteractiveCanvas.prototype.toImage = function () {
3096
+ AbstractInteractiveCanvas.prototype.toImage = function (multiplier) {
3097
3097
  var _this = this;
3098
3098
  var options = {
3099
3099
  format: "png",
3100
- multiplier: this.IMAGE_CAPTURE_COEFFICIENT,
3100
+ multiplier: multiplier || this.IMAGE_CAPTURE_COEFFICIENT,
3101
3101
  enableRetinaScaling: true
3102
3102
  };
3103
3103
  console.debug("Capturing canvas image", options);
@@ -219,8 +219,9 @@ export interface IInteractiveCanvas {
219
219
  toSvg(): string;
220
220
  /**
221
221
  * Export the canvas to a DataUrl image.
222
+ * @param multiplier Multiply the image pixel density by this amount.
222
223
  */
223
- toImage(): string;
224
+ toImage(multiplier?: number): string;
224
225
  /**
225
226
  * Notify the canvas that the object list has changed.
226
227
  */
@@ -3093,11 +3093,11 @@ var AbstractInteractiveCanvas = /** @class */ (function () {
3093
3093
  * @override
3094
3094
  * @inheritDoc
3095
3095
  */
3096
- AbstractInteractiveCanvas.prototype.toImage = function () {
3096
+ AbstractInteractiveCanvas.prototype.toImage = function (multiplier) {
3097
3097
  var _this = this;
3098
3098
  var options = {
3099
3099
  format: "png",
3100
- multiplier: this.IMAGE_CAPTURE_COEFFICIENT,
3100
+ multiplier: multiplier || this.IMAGE_CAPTURE_COEFFICIENT,
3101
3101
  enableRetinaScaling: true
3102
3102
  };
3103
3103
  console.debug("Capturing canvas image", options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leapfrog/interactive-canvas",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Leapfrog interactive canvas",
5
5
  "files": [
6
6
  "dist"