Skip to content

Commit

Permalink
Notify element about hold/release. Closes #111
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkaron committed Jul 10, 2013
1 parent bf76096 commit 0c7e1b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/widget/placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ define([ "jquery", "../component/widget" ], function WidgetPlaceholderModule($,
// Store widget in holding
self[HOLDING] = widget;

// Tell the world
$element.triggerHandler("released", [ widget ]);

// Resolve deferred with widget
deferred.resolve(widget);
}, deferred.reject, deferred.progress);
Expand Down Expand Up @@ -91,6 +94,9 @@ define([ "jquery", "../component/widget" ], function WidgetPlaceholderModule($,
.unweave.apply($element, unweave_args);
})
.then(function () {
// Tell the world
$element.triggerHandler("held", [ widget ]);

deferred.resolve(widget);
}, deferred.reject, deferred.progress);
}
Expand Down

0 comments on commit 0c7e1b2

Please sign in to comment.