| Index: third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-checked-element-behavior-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-checked-element-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-checked-element-behavior-extracted.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..35e1a6763df104f3081965ecc13d87264aa22d6b
|
| --- /dev/null
|
| +++ b/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-checked-element-behavior-extracted.js
|
| @@ -0,0 +1,43 @@
|
| +/**
|
| + * Use `Polymer.PaperCheckedElementBehavior` to implement a custom element
|
| + * that has a `checked` property similar to `Polymer.IronCheckedElementBehavior`
|
| + * and is compatible with having a ripple effect.
|
| + * @polymerBehavior Polymer.PaperCheckedElementBehavior
|
| + */
|
| + Polymer.PaperCheckedElementBehaviorImpl = {
|
| +
|
| + /**
|
| + * Synchronizes the element's checked state with its ripple effect.
|
| + */
|
| + _checkedChanged: function() {
|
| + Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this);
|
| + if (this.hasRipple()) {
|
| + if (this.checked) {
|
| + this._ripple.setAttribute('checked', '');
|
| + } else {
|
| + this._ripple.removeAttribute('checked');
|
| + }
|
| + }
|
| + },
|
| +
|
| + /**
|
| + * Synchronizes the element's `active` and `checked` state.
|
| + */
|
| + _buttonStateChanged: function() {
|
| + Polymer.PaperRippleBehavior._buttonStateChanged.call(this);
|
| + if (this.disabled) {
|
| + return;
|
| + }
|
| + if (this.isAttached) {
|
| + this.checked = this.active;
|
| + }
|
| + }
|
| +
|
| + };
|
| +
|
| + /** @polymerBehavior Polymer.PaperCheckedElementBehavior */
|
| + Polymer.PaperCheckedElementBehavior = [
|
| + Polymer.PaperInkyFocusBehavior,
|
| + Polymer.IronCheckedElementBehavior,
|
| + Polymer.PaperCheckedElementBehaviorImpl
|
| + ];
|
|
|