react-design-editor 0.0.55 → 0.0.56
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.
|
@@ -198269,35 +198269,41 @@ var gifler = __webpack_require__(1135);
|
|
|
198269
198269
|
// CONCATENATED MODULE: ./src/canvas/objects/Gif.ts
|
|
198270
198270
|
|
|
198271
198271
|
|
|
198272
|
-
var Gif = fabric["fabric"].util.createClass(fabric["fabric"].
|
|
198272
|
+
var Gif = fabric["fabric"].util.createClass(fabric["fabric"].Image, {
|
|
198273
198273
|
type: 'gif',
|
|
198274
198274
|
superType: 'image',
|
|
198275
198275
|
gifCanvas: null,
|
|
198276
|
+
gifler: undefined,
|
|
198276
198277
|
isStarted: false,
|
|
198277
198278
|
initialize: function initialize(options) {
|
|
198278
198279
|
options = options || {};
|
|
198279
|
-
this.callSuper('initialize', options);
|
|
198280
198280
|
this.gifCanvas = document.createElement('canvas');
|
|
198281
|
+
this.callSuper('initialize', this.gifCanvas, options);
|
|
198281
198282
|
},
|
|
198282
198283
|
drawFrame: function drawFrame(ctx, frame) {
|
|
198284
|
+
var _this$canvas;
|
|
198285
|
+
|
|
198283
198286
|
// update canvas size
|
|
198284
198287
|
this.gifCanvas.width = frame.width;
|
|
198285
198288
|
this.gifCanvas.height = frame.height; // update canvas that we are using for fabric.js
|
|
198286
198289
|
|
|
198287
|
-
ctx.drawImage(frame.buffer,
|
|
198290
|
+
ctx.drawImage(frame.buffer, 0, 0);
|
|
198291
|
+
(_this$canvas = this.canvas) === null || _this$canvas === void 0 ? void 0 : _this$canvas.renderAll();
|
|
198288
198292
|
},
|
|
198289
198293
|
_render: function _render(ctx) {
|
|
198290
198294
|
var _this = this;
|
|
198291
198295
|
|
|
198292
198296
|
this.callSuper('_render', ctx);
|
|
198297
|
+
this.dirty = true;
|
|
198293
198298
|
|
|
198294
198299
|
if (!this.isStarted) {
|
|
198295
198300
|
this.isStarted = true;
|
|
198296
|
-
window // @ts-ignore
|
|
198297
|
-
.gifler('./images/sample/earth.gif')
|
|
198301
|
+
this.gifler = window // @ts-ignore
|
|
198302
|
+
.gifler('https://themadcreator.github.io/gifler/assets/gif/nyan.gif') // .gifler('./images/sample/earth.gif')
|
|
198303
|
+
.frames(this.gifCanvas, function (context, frame) {
|
|
198298
198304
|
_this.isStarted = true;
|
|
198299
198305
|
|
|
198300
|
-
_this.drawFrame(
|
|
198306
|
+
_this.drawFrame(context, frame);
|
|
198301
198307
|
});
|
|
198302
198308
|
}
|
|
198303
198309
|
}
|
|
@@ -198561,8 +198567,8 @@ var Svg = fabric["fabric"].util.createClass(fabric["fabric"].Group, {
|
|
|
198561
198567
|
}
|
|
198562
198568
|
|
|
198563
198569
|
this.set({
|
|
198564
|
-
fill: options.fill
|
|
198565
|
-
stroke: options.stroke
|
|
198570
|
+
fill: options.fill,
|
|
198571
|
+
stroke: options.stroke
|
|
198566
198572
|
});
|
|
198567
198573
|
this.setCoords();
|
|
198568
198574
|
|
|
@@ -202201,7 +202207,7 @@ var Handler_Handler = /*#__PURE__*/function () {
|
|
|
202201
202207
|
return _this.canvas.renderAll();
|
|
202202
202208
|
}, {
|
|
202203
202209
|
dirty: true,
|
|
202204
|
-
crossOrigin:
|
|
202210
|
+
crossOrigin: 'anonymous'
|
|
202205
202211
|
}));
|
|
202206
202212
|
}
|
|
202207
202213
|
});
|