mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-02 19:14:42 +00:00
Pass original event to "mouse:down" and "mouse:up" ones. Pass target to "mouse:move". This normalizes what's passed to events — target and event.
This commit is contained in:
parent
29ae6b8f0f
commit
6e8d9da003
3 changed files with 8 additions and 8 deletions
|
|
@ -1,3 +1,3 @@
|
|||
/*! Fabric.js Copyright 2008-2011, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.4.5" };
|
||||
var fabric = fabric || { version: "0.4.6" };
|
||||
8
dist/all.js
vendored
8
dist/all.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2011, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.4.5" };
|
||||
var fabric = fabric || { version: "0.4.6" };
|
||||
|
||||
(function(){
|
||||
var view = document.defaultView;
|
||||
|
|
@ -4451,7 +4451,7 @@ fabric.util.getElementOffset = getElementOffset;
|
|||
_this._setCursorFromEvent(e, target);
|
||||
}, 50);
|
||||
|
||||
this.fire('mouse:up', { target: target });
|
||||
this.fire('mouse:up', { target: target, e: e });
|
||||
},
|
||||
|
||||
_shouldClearSelection: function (e) {
|
||||
|
|
@ -4529,7 +4529,7 @@ fabric.util.getElementOffset = getElementOffset;
|
|||
}
|
||||
this.renderAll();
|
||||
|
||||
this.fire('mouse:down', { target: target });
|
||||
this.fire('mouse:down', { target: target, e: e });
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -4794,7 +4794,7 @@ fabric.util.getElementOffset = getElementOffset;
|
|||
}
|
||||
this.renderAll();
|
||||
}
|
||||
this.fire('mouse:move', { e: e });
|
||||
this.fire('mouse:move', { target: target, e: e });
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@
|
|||
_this._setCursorFromEvent(e, target);
|
||||
}, 50);
|
||||
|
||||
this.fire('mouse:up', { target: target });
|
||||
this.fire('mouse:up', { target: target, e: e });
|
||||
},
|
||||
|
||||
_shouldClearSelection: function (e) {
|
||||
|
|
@ -636,7 +636,7 @@
|
|||
// we must renderAll so that active image is placed on the top canvas
|
||||
this.renderAll();
|
||||
|
||||
this.fire('mouse:down', { target: target });
|
||||
this.fire('mouse:down', { target: target, e: e });
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -925,7 +925,7 @@
|
|||
// only commit here. when we are actually moving the pictures
|
||||
this.renderAll();
|
||||
}
|
||||
this.fire('mouse:move', { e: e });
|
||||
this.fire('mouse:move', { target: target, e: e });
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue