Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-checked-element-behavior-extracted.js

Issue 1401633002: Update Polymer from 1.1.4 -> 1.1.5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dzhioev@ review Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /**
2 * Use `Polymer.PaperCheckedElementBehavior` to implement a custom element
3 * that has a `checked` property similar to `Polymer.IronCheckedElementBehavio r`
4 * and is compatible with having a ripple effect.
5 * @polymerBehavior Polymer.PaperCheckedElementBehavior
6 */
7 Polymer.PaperCheckedElementBehaviorImpl = {
8
9 /**
10 * Synchronizes the element's checked state with its ripple effect.
11 */
12 _checkedChanged: function() {
13 Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this);
14 if (this.hasRipple()) {
15 if (this.checked) {
16 this._ripple.setAttribute('checked', '');
17 } else {
18 this._ripple.removeAttribute('checked');
19 }
20 }
21 },
22
23 /**
24 * Synchronizes the element's `active` and `checked` state.
25 */
26 _buttonStateChanged: function() {
27 Polymer.PaperRippleBehavior._buttonStateChanged.call(this);
28 if (this.disabled) {
29 return;
30 }
31 if (this.isAttached) {
32 this.checked = this.active;
33 }
34 }
35
36 };
37
38 /** @polymerBehavior Polymer.PaperCheckedElementBehavior */
39 Polymer.PaperCheckedElementBehavior = [
40 Polymer.PaperInkyFocusBehavior,
41 Polymer.IronCheckedElementBehavior,
42 Polymer.PaperCheckedElementBehaviorImpl
43 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698