From 89dad1ce2ae56a8817feda41edd2079505e9e9e6 Mon Sep 17 00:00:00 2001 From: Ceci Date: Mon, 10 Oct 2016 00:20:38 -0500 Subject: [PATCH] fix: remove usages of es6 from component and tests (#7) * Fixed a small polylint issue --- salte-rating.html | 18 +++++++++++++----- test/basic.html | 16 ++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/salte-rating.html b/salte-rating.html index 9a0c5cd..b5496a7 100644 --- a/salte-rating.html +++ b/salte-rating.html @@ -105,7 +105,15 @@ type: Boolean, value: false, reflectToAttribute: true - } + }, + + /** + * The rating items displayed on the screen + */ + limitItems: { + type: Array, + readOnly: true + } }, attached: function() { @@ -125,15 +133,15 @@ * Renders the items based on the limit */ renderItems: function() { - let limitItems = []; - for (let i = 0; i < this.limit; i++) { + var limitItems = []; + for (var i = 0; i < this.limit; i++) { limitItems.push(i); } - this.set('limitItems', limitItems); + this._setLimitItems(limitItems); }, _refreshRating: function(value) { - let items = Polymer.dom(this.root).querySelectorAll('.item-icon'); + var items = Polymer.dom(this.root).querySelectorAll('.item-icon'); for (var i = 0; i < items.length; i++) { items[i].style.width = Math.min(Math.max(value - i, 0), 1) * 100 + '%'; } diff --git a/test/basic.html b/test/basic.html index cc0dc1b..61cd884 100644 --- a/test/basic.html +++ b/test/basic.html @@ -21,24 +21,24 @@