| Index: third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
|
| index 5c1031b49b8adb14464b6b93fd377de94471e03b..6157fa11c460462c6db6cf43bd61ea0bee171c1b 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
|
| @@ -4,34 +4,38 @@
|
| Polymer.IronSelectableBehavior = {
|
|
|
| /**
|
| - * Fired when iron-selector is activated (selected or deselected).
|
| - * It is fired before the selected items are changed.
|
| - * Cancel the event to abort selection.
|
| + * Fired when iron-selector is activated (selected or deselected).
|
| + * It is fired before the selected items are changed.
|
| + * Cancel the event to abort selection.
|
| *
|
| * @event iron-activate
|
| - *
|
| - **/
|
| + */
|
| +
|
| /**
|
| - * Fired when an item is selected
|
| + * Fired when an item is selected
|
| *
|
| * @event iron-select
|
| - *
|
| - **/
|
| + */
|
| +
|
| /**
|
| - * Fired when an item is deselected
|
| + * Fired when an item is deselected
|
| *
|
| * @event iron-deselect
|
| + */
|
| +
|
| + /**
|
| + * Fired when the list of selectable items changes (e.g., items are
|
| + * added or removed). The detail of the event is a list of mutation
|
| + * records that describe what changed.
|
| *
|
| - **/
|
| + * @event iron-items-changed
|
| + */
|
|
|
| properties: {
|
|
|
| /**
|
| * If you want to use the attribute value of an element for `selected` instead of the index,
|
| * set this to the name of the attribute.
|
| - *
|
| - * @attribute attrForSelected
|
| - * @type {string}
|
| */
|
| attrForSelected: {
|
| type: String,
|
| @@ -40,9 +44,6 @@
|
|
|
| /**
|
| * Gets or sets the selected element. The default is to use the index of the item.
|
| - *
|
| - * @attribute selected
|
| - * @type {string}
|
| */
|
| selected: {
|
| type: String,
|
| @@ -51,9 +52,6 @@
|
|
|
| /**
|
| * Returns the currently selected item.
|
| - *
|
| - * @attribute selectedItem
|
| - * @type {Object}
|
| */
|
| selectedItem: {
|
| type: Object,
|
| @@ -65,10 +63,6 @@
|
| * The event that fires from items when they are selected. Selectable
|
| * will listen for this event from items and update the selection state.
|
| * Set to empty string to listen to no events.
|
| - *
|
| - * @attribute activateEvent
|
| - * @type {string}
|
| - * @default 'tap'
|
| */
|
| activateEvent: {
|
| type: String,
|
| @@ -79,17 +73,11 @@
|
| /**
|
| * This is a CSS selector string. If this is set, only items that match the CSS selector
|
| * are selectable.
|
| - *
|
| - * @attribute selectable
|
| - * @type {string}
|
| */
|
| selectable: String,
|
|
|
| /**
|
| * The class to set on elements when selected.
|
| - *
|
| - * @attribute selectedClass
|
| - * @type {string}
|
| */
|
| selectedClass: {
|
| type: String,
|
| @@ -98,9 +86,6 @@
|
|
|
| /**
|
| * The attribute to set on elements when selected.
|
| - *
|
| - * @attribute selectedAttribute
|
| - * @type {string}
|
| */
|
| selectedAttribute: {
|
| type: String,
|
| @@ -111,10 +96,8 @@
|
| * The set of excluded elements where the key is the `localName`
|
| * of the element that will be ignored from the item list.
|
| *
|
| - * @type {object}
|
| * @default {template: 1}
|
| */
|
| -
|
| excludedLocalNames: {
|
| type: Object,
|
| value: function() {
|
| @@ -283,7 +266,15 @@
|
|
|
| // observe items change under the given node.
|
| _observeItems: function(node) {
|
| - var observer = new MutationObserver(function() {
|
| + // TODO(cdata): Update this when we get distributed children changed.
|
| + var observer = new MutationObserver(function(mutations) {
|
| + // Let other interested parties know about the change so that
|
| + // we don't have to recreate mutation observers everywher.
|
| + this.fire('iron-items-changed', mutations, {
|
| + bubbles: false,
|
| + cancelable: false
|
| + });
|
| +
|
| if (this.selected != null) {
|
| this._updateSelected();
|
| }
|
|
|