Skip to content

Commit

Permalink
Update 2011-9-1-raphael-vs-fabric-simple.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Apr 7, 2022
1 parent e4c6fda commit 03466d2
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions posts/benchmarks/_posts/2011-9-1-raphael-vs-fabric-simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@
startTime = new Date(),
circle, klass;

canvas.on({
'object:selected': function(e) {
e.target.set('opacity', 0.75);
},
'mouse:up': function(e) {
if (e.target) {
e.target.set('opacity', 1);
canvas.renderAll();
}
canvas.on('mouse:down', function (e) {
e.target && e.target.set('opacity', 0.5);
});
canvas.on('mouse:up', function (e) {
if (e.target) {
e.target.set('opacity', 1);
canvas.requestRenderAll();
}
});

Expand All @@ -100,7 +98,7 @@
return true;
},
isCacheDirty: function () {
return false;
return this.dirty;
},
_createCacheCanvas: function () {
this._cacheProperties = {};
Expand All @@ -121,7 +119,7 @@
zoomX: this.zoomX,
zoomY: this.zoomY,
});
this.drawObject(this._cacheContext, false);
this.dirty = true;
}
},
})
Expand Down

1 comment on commit 03466d2

@ShaMan123
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of #342

Please sign in to comment.