Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit 9824986

Browse files
committed
Convert from createCanvasForNode
The Fabric libary now relies entirely on `jsdom`, so the `canvas` is abstracted away. Use the `StaticCanvas` form, that is the current recommendation for use with node. See: fabricjs/fabric.js#3885
1 parent 4aeaf78 commit 9824986

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ImageMarkupCall.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ function processJSON(json) {
119119
cleanJSON(json);
120120

121121
var finalSize = json["finalDimensions"];
122-
var canvas = Fabric.createCanvasForNode(
123-
finalSize["width"],
124-
finalSize["height"]
125-
);
122+
var canvas = new Fabric.StaticCanvas(null, {
123+
width: finalSize["width"],
124+
height: finalSize["height"],
125+
});
126126
var builder = ImageMarkupBuilder(canvas);
127127

128128
builder.processJSON(json, function () {

0 commit comments

Comments
 (0)