diff --git a/src/lib/bind/accessors.html b/src/lib/bind/accessors.html
index 66175deae6..be5e8d39d5 100644
--- a/src/lib/bind/accessors.html
+++ b/src/lib/bind/accessors.html
@@ -23,7 +23,7 @@
_notifyChange: function(source, event, value) {
value = value === undefined ? this[source] : value;
event = event || Polymer.CaseMap.camelToDashCase(source) + '-changed';
- this.fire(event, {value: value},
+ this.fire(event, {value: value},
{bubbles: false, cancelable: false, _useCache: true});
},
@@ -189,12 +189,12 @@
return name[0].toUpperCase() + name.substring(1);
},
- _addAnnotatedListener: function(model, index, property, path, event) {
+ _addAnnotatedListener: function(model, index, property, path, event, negated) {
if (!model._bindListeners) {
model._bindListeners = [];
}
var fn = this._notedListenerFactory(property, path,
- this._isStructured(path));
+ this._isStructured(path), negated);
var eventName = event ||
(Polymer.CaseMap.camelToDashCase(property) + '-changed');
model._bindListeners.push({
@@ -214,17 +214,22 @@
return e.path && e.path[0] !== target;
},
- _notedListenerFactory: function(property, path, isStructured) {
+ _notedListenerFactory: function(property, path, isStructured, negated) {
return function(target, value, targetPath) {
if (targetPath) {
this._notifyPath(this._fixPath(path, property, targetPath), value);
} else {
// TODO(sorvell): even though we have a `value` argument, we *must*
// lookup the current value of the property. Multiple listeners and
- // queued events during configuration can theoretically lead to
- // divergence of the passed value from the current value, but we
+ // queued events during configuration can theoretically lead to
+ // divergence of the passed value from the current value, but we
// really need to track down a specific case where this happens.
value = target[property];
+
+ if (negated) {
+ value = !value;
+ }
+
if (!isStructured) {
this[path] = value;
} else {
diff --git a/src/lib/bind/effects.html b/src/lib/bind/effects.html
index 06be143364..2f987fa11e 100644
--- a/src/lib/bind/effects.html
+++ b/src/lib/bind/effects.html
@@ -17,8 +17,7 @@
effect.kind != 'attribute' &&
effect.kind != 'text' &&
!effect.isCompound &&
- effect.parts[0].mode === '{' &&
- !effect.parts[0].negate;
+ effect.parts[0].mode === '{';
},
_annotationEffect: function(source, value, effect) {
diff --git a/src/standard/effectBuilder.html b/src/standard/effectBuilder.html
index a99d4d26b5..9a184b7ef1 100644
--- a/src/standard/effectBuilder.html
+++ b/src/standard/effectBuilder.html
@@ -136,7 +136,7 @@
if (Polymer.Bind._shouldAddListener(note)) {
// .on.-changed: = e.detail.value
Polymer.Bind._addAnnotatedListener(this, index,
- note.name, note.parts[0].value, note.parts[0].event);
+ note.name, note.parts[0].value, note.parts[0].event, note.parts[0].negate);
}
for (var i=0; i
+
+