Skip to content

Commit

Permalink
Tweak whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
arcatdmz committed Jul 14, 2020
1 parent e91cc9d commit 6c265fb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions posts/_posts/2020-7-15-fabricjs-psbrush.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ After loading the main script through `script` tag, `fabric.PSBrush` can be init
}'
>
<pre data-lang="html">
<canvas id="c" width="400" height="300" style="border:1px solid #ccc"></canvas>
<canvas id="c" width="400" height="300" style="border:1px solid #ccc"></canvas>
</pre>
<pre data-lang="js">
// Create a Fabric.js canvas
let canvas = new fabric.Canvas('c', {
isDrawingMode: true,
enablePointerEvents: true
});

// Initialize a brush
let brush = new fabric.PSBrush(canvas);
brush.width = 10;
brush.color = "#000";
canvas.freeDrawingBrush = brush;
// Create a Fabric.js canvas
let canvas = new fabric.Canvas('c', {
isDrawingMode: true,
enablePointerEvents: true
});

// Feel free to explore properties of this brush...
window.brush = brush;
// Initialize a brush
let brush = new fabric.PSBrush(canvas);
brush.width = 10;
brush.color = "#000";
canvas.freeDrawingBrush = brush;

// Feel free to explore properties of this brush...
window.brush = brush;
</pre>
</div>

0 comments on commit 6c265fb

Please sign in to comment.