From 124d50e6d63359ebac8b8e88dc58b8bb148411ac Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 29 May 2015 20:15:29 -0700 Subject: [PATCH] Polymer 1.0: Update to latest version --- homeassistant/components/frontend/version.py | 2 +- .../frontend/www_static/frontend.html | 900 +++++++++++------- .../frontend/www_static/polymer/bower.json | 55 +- .../www_static/polymer/html-minifier.conf | 11 + .../resources/home-assistant-icons.html | 2 +- scripts/build_frontend | 12 +- 6 files changed, 592 insertions(+), 390 deletions(-) create mode 100644 homeassistant/components/frontend/www_static/polymer/html-minifier.conf diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index 4d785fdba69ed6..cd7ca59febb52d 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -1,2 +1,2 @@ """ DO NOT MODIFY. Auto-generated by build_frontend script """ -VERSION = "98bb95f776cee5e6271373701c0322e6" +VERSION = "c164af7349b4750365f03b190e11cc8d" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index c9e04caebfce44..a2d42c0df711eb 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -537,7 +537,7 @@ } }); -Polymer.version = "1.0.0"; +Polymer.version = "1.0.2"; Polymer.Base._addFeature({ _registerFeatures: function() { @@ -2219,7 +2219,7 @@ var TAP_DISTANCE = 25; var TRACK_DISTANCE = 5; var TRACK_LENGTH = 2; -var MOUSE_TIMEOUT = 500; +var MOUSE_TIMEOUT = 2500; var MOUSE_EVENTS = [ "mousedown", "mousemove", "mouseup", "click" ]; var mouseCanceller = function(mouseEvent) { mouseEvent[HANDLED_OBJ] = { @@ -2236,36 +2236,38 @@ mouseEvent.stopPropagation(); } }; -function ignoreMouse(set) { -if (set && POINTERSTATE.touch.mouseIgnoreId !== -1) { -return; -} +function setupTeardownMouseCanceller(setup) { for (var i = 0, en; i < MOUSE_EVENTS.length; i++) { en = MOUSE_EVENTS[i]; -if (set) { +if (setup) { document.addEventListener(en, mouseCanceller, true); } else { document.removeEventListener(en, mouseCanceller, true); } } -if (set) { -POINTERSTATE.mouse.mouseIgnoreId = setTimeout(ignoreMouse, MOUSE_TIMEOUT); -} else { -POINTERSTATE.mouse.target = null; -POINTERSTATE.touch.mouseIgnoreId = -1; } +function ignoreMouse() { +if (!POINTERSTATE.mouse.mouseIgnoreJob) { +setupTeardownMouseCanceller(true); +} +var unset = function() { +setupTeardownMouseCanceller(); +POINTERSTATE.mouse.target = null; +POINTERSTATE.mouse.mouseIgnoreJob = null; +}; +POINTERSTATE.mouse.mouseIgnoreJob = Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob, unset, MOUSE_TIMEOUT); } var POINTERSTATE = { tapPrevented: false, mouse: { -target: null +target: null, +mouseIgnoreJob: null }, touch: { x: 0, y: 0, id: -1, -scrollDecided: false, -mouseIgnoreId: -1 +scrollDecided: false } }; function firstTouchAction(ev) { @@ -2552,6 +2554,7 @@ dy: dy, ddx: ddx, ddy: ddy, +sourceEvent: touch, hover: function() { return Gestures.deepTargetFind(touch.clientX, touch.clientY); } @@ -2563,12 +2566,12 @@ deps: [ "mousedown", "click", "touchstart", "touchend" ], emits: [ "tap" ], start: { -x: 0, -y: 0 +x: NaN, +y: NaN }, reset: function() { -this.start.x = 0; -this.start.y = 0; +this.start.x = NaN; +this.start.y = NaN; }, save: function(e) { this.start.x = e.clientX; @@ -2591,7 +2594,7 @@ forward: function(e) { var dx = Math.abs(e.clientX - this.start.x); var dy = Math.abs(e.clientY - this.start.y); -if (isNaN(dx) || isNaN(dy) || dx <= TAP_DISTANCE || dy <= TAP_DISTANCE) { +if (isNaN(dx) || isNaN(dy) || dx <= TAP_DISTANCE && dy <= TAP_DISTANCE) { if (!POINTERSTATE.tapPrevented) { Gestures.fire(e.target, "tap", { x: e.clientX, @@ -5629,9 +5632,7 @@ this._removeChildren(); } }); - + @@ -22426,6 +22625,7 @@

Hi there!

[[entryObj.message]] @@ -23648,7 +23848,6 @@

Current entities:

- +.disabled > #sliderKnob > #sliderKnobInner { + width: 8px; + height: 8px; + background-color: var(--paper-slider-disabled-knob-color, --google-grey-500); +} +.disabled.ring > #sliderKnob > #sliderKnobInner { + background-color: transparent; +} +