Permalink
Browse files

When a transactional change occurs, pass the object it occurred on.

  • Loading branch information...
1 parent 72e4595 commit 89779a51b0348b148f5c6886882e3c88fcd830f4 @fblee fblee committed Feb 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/lib/model.js
View
4 js/lib/model.js
@@ -29,7 +29,7 @@ lib.model = function (_public, _protected, declared_attributes) {
var change_event_name = name + '_change';
lib.hasEvent(_public, _protected, change_event_name);
_public.on(change_event_name, function (new_value) {
- _public.transactionalTrigger('change');
+ _public.transactionalTrigger('change', _public);
});
// Define getter/setter for the attribute.
@@ -178,7 +178,7 @@ lib.model = function (_public, _protected, declared_attributes) {
// times in the same transaction if the onChange handlers also triggered changes).
if (_protected.transaction_triggered_change) {
_protected.transaction_triggered_change = false;
- _public.triggerChange();
+ _public.triggerChange(_public);
}
return ret;
};

0 comments on commit 89779a5

Please sign in to comment.