Skip to content

Commit

Permalink
1.4.0 update readme, minify command, redundant changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alimozdemir committed May 5, 2020
1 parent 3bf9617 commit 079f78e
Show file tree
Hide file tree
Showing 6 changed files with 1,440 additions and 46 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import 'fabric-history';

Following commands will undo and redo the canvas.

```
```javascript
canvas.undo();

canvas.redo();
Expand Down Expand Up @@ -84,8 +84,21 @@ You can find an advanced example on demo folder.
- history:clear
- Fired when whole history cleared

# Callbacks


```javascript
canvas.undo(function() {
console.log('post undo');
});

canvas.redo(function() {
console.log('post redo');
});
```

# Functions

- undo
- redo
- clear
- clearHistory
2 changes: 1 addition & 1 deletion demo/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.4.0/fabric.min.js"></script>
<script src="libs/jsonviewer.js"></script>
<script src="../src/index.js"></script>
<script src="../src/index.min.js"></script>
<script>
let isDrawingMode = false;
const canvas = new fabric.Canvas(document.querySelector('canvas'));
Expand Down
Loading

0 comments on commit 079f78e

Please sign in to comment.