3 is
: 'paper-radio-group',
6 Polymer
.IronA11yKeysBehavior
,
7 Polymer
.IronSelectableBehavior
17 * Overriden from Polymer.IronSelectableBehavior
25 * Overriden from Polymer.IronSelectableBehavior
33 * Overriden from Polymer.IronSelectableBehavior
37 value
: 'paper-radio-button'
42 'left up': 'selectPrevious',
43 'right down': 'selectNext',
47 * Selects the given value.
49 select: function(value
) {
51 var oldItem
= this._valueToItem(this.selected
);
53 // Do not allow unchecking the selected item.
54 if (this.selected
== value
) {
55 oldItem
.checked
= true;
60 oldItem
.checked
= false;
63 Polymer
.IronSelectableBehavior
.select
.apply(this, [value
]);
64 this.fire('paper-radio-group-changed');
68 * Selects the previous item. If the previous item is disabled, then it is
69 * skipped, and its previous item is selected
71 selectPrevious: function() {
72 var length
= this.items
.length
;
73 var newIndex
= Number(this._valueToIndex(this.selected
));
76 newIndex
= (newIndex
- 1 + length
) % length
;
77 } while (this.items
[newIndex
].disabled
)
79 this.select(this._indexToValue(newIndex
));
83 * Selects the next item. If the next item is disabled, then it is
84 * skipped, and the next item after it is selected.
86 selectNext: function() {
87 var length
= this.items
.length
;
88 var newIndex
= Number(this._valueToIndex(this.selected
));
91 newIndex
= (newIndex
+ 1 + length
) % length
;
92 } while (this.items
[newIndex
].disabled
)
94 this.select(this._indexToValue(newIndex
));