mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-07 16:00:59 +00:00
Search the target again on mouse up
This commit is contained in:
parent
81faf427fa
commit
b95b4d2b2f
1 changed files with 8 additions and 8 deletions
|
|
@ -249,21 +249,20 @@
|
|||
* @param {Event} e Event object fired on mouseup
|
||||
*/
|
||||
__onMouseUp: function (e) {
|
||||
var target;
|
||||
var target, searchTarget = true, transform = this._currentTransform;
|
||||
|
||||
if (this.isDrawingMode && this._isCurrentlyDrawing) {
|
||||
this._onMouseUpInDrawingMode(e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._currentTransform) {
|
||||
if (transform) {
|
||||
this._finalizeCurrentTransform();
|
||||
target = this._currentTransform.target;
|
||||
}
|
||||
else {
|
||||
target = this.findTarget(e, true);
|
||||
searchTarget = !transform.actionPerformed;
|
||||
}
|
||||
|
||||
target = searchTarget ? this.findTarget(e, true) : transform.target;
|
||||
|
||||
var shouldRender = this._shouldRender(target, this.getPointer(e));
|
||||
|
||||
this._maybeGroupObjects(e);
|
||||
|
|
@ -280,11 +279,12 @@
|
|||
_handleCursorAndEvent: function(e, target) {
|
||||
this._setCursorFromEvent(e, target);
|
||||
|
||||
// Can't find any reason, disabling for now
|
||||
// TODO: why are we doing this?
|
||||
var _this = this;
|
||||
/* var _this = this;
|
||||
setTimeout(function () {
|
||||
_this._setCursorFromEvent(e, target);
|
||||
}, 50);
|
||||
}, 50); */
|
||||
|
||||
this.fire('mouse:up', { target: target, e: e });
|
||||
target && target.fire('mouseup', { e: e });
|
||||
|
|
|
|||
Loading…
Reference in a new issue