Skip to content

Commit

Permalink
fix(history): fix the bug that the cursor of workspace will turn into…
Browse files Browse the repository at this point in the history
… pointer after triggering undo (#500)

Co-authored-by: GeorgeSmith <[email protected]>
  • Loading branch information
GeorgeSmith215 and GeorgeSmith authored Jul 30, 2024
1 parent fbdc997 commit 0f14c3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/utils/fabric-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ fabric.Canvas.prototype.redo = function (callback) {
fabric.Canvas.prototype._loadHistory = function (history, event, callback) {
var that = this;

history?.objects?.forEach((item) => {
if (item?.id === 'workspace') item.evented = false;
});
this.loadFromJSON(history, function () {
that.renderAll();
that.fire(event);
Expand Down

0 comments on commit 0f14c3e

Please sign in to comment.