backbone-relations
Advanced tools
Comparing version 0.8.2 to 0.8.3
@@ -17,2 +17,4 @@ (function (root, factory) { | ||
var KeyMap = herit(); | ||
var Relation = herit({ | ||
@@ -46,2 +48,14 @@ constructor: function (options) { | ||
); | ||
}, | ||
proxyEvent: function () { | ||
var keyMap = _.find(arguments, function (argument) { | ||
return argument instanceof KeyMap; | ||
}); | ||
if (!keyMap) [].push.call(arguments, keyMap = new KeyMap()); | ||
if (keyMap[this.key]) return; | ||
keyMap[this.key] = true; | ||
if (this.reverse) keyMap[this.reverse] = true; | ||
arguments[0] = this.key + ':' + arguments[0]; | ||
this.owner.trigger.apply(this.owner, arguments); | ||
} | ||
@@ -82,3 +96,3 @@ }); | ||
} | ||
return instance; | ||
return instance.on('all', this.proxyEvent, this); | ||
}, | ||
@@ -107,3 +121,3 @@ | ||
} | ||
return instance; | ||
return instance.on('all', this.proxyEvent, this); | ||
} | ||
@@ -110,0 +124,0 @@ }); |
{ | ||
"name": "backbone-relations", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"main": "./backbone-relations.js", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
{ | ||
"name": "backbone-relations", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"author": "Casey Foster <c@sey.me>", | ||
@@ -5,0 +5,0 @@ "licence": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36021
185