Skip to content

Instantly share code, notes, and snippets.

View abods's full-sized avatar

Abdullah alotaibi abods

View GitHub Profile
@ZAYEC77
ZAYEC77 / fabricJS history
Created September 12, 2015 10:30
History implementation for fabricJS
function (canvas, container) {
var history = {state: [], lock: true, mods: 0};
app.history = history;
canvas.on('history.lock', function () {
history.lock = true;
});
canvas.on('history.unlock', function () {
history.lock = false;