From 822b725189bf3307976a9700650f40c89092b558 Mon Sep 17 00:00:00 2001 From: Carlos Baraza Date: Tue, 9 Dec 2014 19:15:02 +0100 Subject: [PATCH] Remove some trailing spaces --- core-selector.html | 52 +++++++++++++++++++++++----------------------- demo.html | 24 ++++++++++----------- test/content.html | 10 ++++----- test/multi.html | 2 +- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/core-selector.html b/core-selector.html index c3ca140..a6b5847 100644 --- a/core-selector.html +++ b/core-selector.html @@ -130,7 +130,7 @@ /** * Specifies the CSS class to be used to add to the selected element. - * + * * @attribute selectedClass * @type string * @default 'core-selected' @@ -162,7 +162,7 @@ * an array of selected elements. * Note that you should not use this to set the selection. Instead use * `selected`. - * + * * @attribute selectedItem * @type Object * @default null @@ -172,9 +172,9 @@ /** * In single selection, this returns the model associated with the * selected element. - * Note that you should not use this to set the selection. Instead use + * Note that you should not use this to set the selection. Instead use * `selected`. - * + * * @attribute selectedModel * @type Object * @default null @@ -193,7 +193,7 @@ selectedIndex: -1, /** - * Nodes with local name that are in the list will not be included + * Nodes with local name that are in the list will not be included * in the selection items. In the following example, `items` returns four * `core-item`'s and doesn't include `h3` and `hr`. * @@ -213,9 +213,9 @@ excludedLocalNames: '', /** - * The target element that contains items. If this is not set + * The target element that contains items. If this is not set * core-selector is the container. - * + * * @attribute target * @type Object * @default null @@ -223,7 +223,7 @@ target: null, /** - * This can be used to query nodes from the target node to be used for + * This can be used to query nodes from the target node to be used for * selection items. Note this only works if `target` is set * and is not `core-selector` itself. * @@ -236,7 +236,7 @@ *
*

color = {{color}}

* - * + * * @attribute itemsSelector * @type string * @default '' @@ -264,7 +264,7 @@ notap: false, defaultExcludedLocalNames: 'template', - + observe: { 'selected multi': 'selectedChanged' }, @@ -288,8 +288,8 @@ if (!this.target) { return []; } - var nodes = this.target !== this ? (this.itemsSelector ? - this.target.querySelectorAll(this.itemsSelector) : + var nodes = this.target !== this ? (this.itemsSelector ? + this.target.querySelectorAll(this.itemsSelector) : this.target.children) : this.$.items.getDistributedNodes(); return Array.prototype.filter.call(nodes, this.itemFilter); }, @@ -332,7 +332,7 @@ /** * Returns the selected item(s). If the `multi` property is true, - * this will return an array, otherwise it will return + * this will return an array, otherwise it will return * the selected item or undefined if there is no selection. */ get selection() { @@ -348,7 +348,7 @@ this.updateSelected(); } }, - + updateSelected: function() { this.validateSelected(); if (this.multi) { @@ -363,7 +363,7 @@ validateSelected: function() { // convert to an array for multi-selection - if (this.multi && !Array.isArray(this.selected) && + if (this.multi && !Array.isArray(this.selected) && this.selected != null) { this.selected = [this.selected]; // use the first selected in the array for single-selection @@ -373,7 +373,7 @@ this.selected = s; } }, - + processSplices: function(splices) { for (var i = 0, splice; splice = splices[i]; i++) { for (var j = 0; j < splice.removed.length; j++) { @@ -398,7 +398,7 @@ var item = this.valueToItem(value); this.$.selection.select(item); }, - + setValueSelected: function(value, isSelected) { var item = this.valueToItem(value); if (isSelected ^ this.$.selection.isSelected(item)) { @@ -417,12 +417,12 @@ } else { this.selectedModel = null; } - this.selectedIndex = this.selectedItem ? + this.selectedIndex = this.selectedItem ? parseInt(this.valueToIndex(this.selected)) : -1; }, - + valueToItem: function(value) { - return (value === null || value === undefined) ? + return (value === null || value === undefined) ? null : this.items[this.valueToIndex(value)]; }, @@ -506,7 +506,7 @@ target = target.parentNode; } }, - + selectIndex: function(index) { var item = this.items[index]; if (item) { @@ -514,7 +514,7 @@ return item; } }, - + /** * Selects the previous item. This should be used in single selection only. * @@ -524,11 +524,11 @@ * @returns the previous item or undefined if there is none */ selectPrevious: function(wrapped) { - var i = wrapped && !this.selectedIndex ? + var i = wrapped && !this.selectedIndex ? this.items.length - 1 : this.selectedIndex - 1; return this.selectIndex(i); }, - + /** * Selects the next item. This should be used in single selection only. * @@ -538,11 +538,11 @@ * @returns the next item or undefined if there is none */ selectNext: function(wrapped) { - var i = wrapped && this.selectedIndex >= this.items.length - 1 ? + var i = wrapped && this.selectedIndex >= this.items.length - 1 ? 0 : this.selectedIndex + 1; return this.selectIndex(i); } - + }); diff --git a/demo.html b/demo.html index cbadf20..22862d0 100644 --- a/demo.html +++ b/demo.html @@ -27,29 +27,29 @@ margin: 0; padding: 0; } - + .list > * { height: 40px; line-height: 40px; padding: 0 20px; border-bottom: 1px solid #ccc; } - + .list > *.core-selected { background: #333; } - + li { height: 30px; } - + li.core-selected:after { content: "\2713"; position: absolute; padding-left: 10px; } - +

basic

Item 0
@@ -58,7 +58,7 @@

basic

Item 3
Item 4
- +

multi-selection

Item 0
@@ -67,7 +67,7 @@

multi-selection

Item 3
Item 4
- +

list

- +

binding of a group of radio buttons to a variable

-

@@ -88,7 +88,7 @@

binding of a group of radio buttons to a variable


color = {{color}}

- + - + diff --git a/test/content.html b/test/content.html index e6ede77..fc77d08 100644 --- a/test/content.html +++ b/test/content.html @@ -43,11 +43,11 @@