@leapfrog/interactive-canvas 2.0.2 → 2.0.3

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.
@@ -3,7 +3,7 @@ export declare class InteractiveCanvas extends AbstractInteractiveCanvas {
3
3
  protected devicePixelRatio: number;
4
4
  readonly headless: boolean;
5
5
  private readonly undoStack;
6
- constructor(elementId: string, devicePixelRatio: number);
6
+ constructor(canvas: HTMLCanvasElement, devicePixelRatio: number);
7
7
  /**
8
8
  * @override
9
9
  * @inheritDoc
@@ -3918,11 +3918,12 @@ var UndoStack = /** @class */ (function () {
3918
3918
 
3919
3919
  var InteractiveCanvas = /** @class */ (function (_super) {
3920
3920
  __extends(InteractiveCanvas, _super);
3921
- function InteractiveCanvas(elementId, devicePixelRatio) {
3922
- var _this = _super.call(this, window['fabric'], new window['fabric'].Canvas(elementId), devicePixelRatio) || this;
3921
+ function InteractiveCanvas(canvas, devicePixelRatio) {
3922
+ var _this = _super.call(this, window['fabric'], new window['fabric'].Canvas(canvas), devicePixelRatio) || this;
3923
3923
  _this.devicePixelRatio = devicePixelRatio;
3924
3924
  _this.headless = false;
3925
3925
  _this.undoStack = new UndoStack(_this);
3926
+ console.log('****************', canvas);
3926
3927
  //Initialize watchers
3927
3928
  _this.fabricCanvas.on("selection:updated", function () { return _this.onFabricSelectionChanged(); });
3928
3929
  _this.fabricCanvas.on("selection:created", function () { return _this.onFabricSelectionChanged(); });
@@ -3918,11 +3918,12 @@ var UndoStack = /** @class */ (function () {
3918
3918
 
3919
3919
  var InteractiveCanvas = /** @class */ (function (_super) {
3920
3920
  __extends(InteractiveCanvas, _super);
3921
- function InteractiveCanvas(elementId, devicePixelRatio) {
3922
- var _this = _super.call(this, window['fabric'], new window['fabric'].Canvas(elementId), devicePixelRatio) || this;
3921
+ function InteractiveCanvas(canvas, devicePixelRatio) {
3922
+ var _this = _super.call(this, window['fabric'], new window['fabric'].Canvas(canvas), devicePixelRatio) || this;
3923
3923
  _this.devicePixelRatio = devicePixelRatio;
3924
3924
  _this.headless = false;
3925
3925
  _this.undoStack = new UndoStack(_this);
3926
+ console.log('****************', canvas);
3926
3927
  //Initialize watchers
3927
3928
  _this.fabricCanvas.on("selection:updated", function () { return _this.onFabricSelectionChanged(); });
3928
3929
  _this.fabricCanvas.on("selection:created", function () { return _this.onFabricSelectionChanged(); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leapfrog/interactive-canvas",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Leapfrog interactive canvas",
5
5
  "files": [
6
6
  "dist"