pass activeObject to event

This commit is contained in:
Asturur 2017-08-19 23:39:24 +02:00
parent a15d480d07
commit ffe49ccf9c

View file

@ -1391,7 +1391,7 @@
var active = this._activeObject;
if (active) {
if (active.type === 'activeSelection' && active._objects) {
return active._objects;
return active._objects.slice(0);
}
else {
return [active];
@ -1487,7 +1487,7 @@
if (activeObject) {
this.fire('before:selection:cleared', { target: activeObject, e: e });
if (this._discardActiveObject(e)) {
this.fire('selection:cleared', { e: e });
this.fire('selection:cleared', { e: e, target: activeObject });
activeObject.fire('deselected', { e: e });
}
}