Prevent pointer events in hero-progress-button if active is true

Fixes: https://github.com/resin-io/resin-etcher/issues/121
This commit is contained in:
Juan Cruz Viotti 2016-01-22 13:02:48 -04:00
parent 111529ee71
commit 03e9b977cb
2 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@
<dom-module id="hero-progress-button"> <dom-module id="hero-progress-button">
<template> <template>
<style> <style>
:host:not([percentage="0"]) { :host[active="true"] {
pointer-events: none; pointer-events: none;
} }
@ -39,6 +39,9 @@
Polymer({ Polymer({
is: 'hero-progress-button', is: 'hero-progress-button',
properties: { properties: {
active: {
type: Boolean
},
disabled: { disabled: {
type: String type: String
}, },

View File

@ -78,7 +78,7 @@
<hero-badge class="block space-vertical-medium" ng-disabled="!app.selection.hasImage() || !app.selection.hasDrive()">3</hero-badge> <hero-badge class="block space-vertical-medium" ng-disabled="!app.selection.hasImage() || !app.selection.hasDrive()">3</hero-badge>
<div class="space-vertical-large"> <div class="space-vertical-large">
<hero-progress-button percentage="{{ app.state.progress }}" active="{{ app.writer.isBurning() }}" <hero-progress-button percentage="{{ app.state.progress }}" ng-attr-active="{{ app.writer.isBurning() }}"
ng-click="app.burn(app.selection.getImage(), app.selection.getDrive())" ng-click="app.burn(app.selection.getImage(), app.selection.getDrive())"
ng-disabled="!app.selection.hasImage() || !app.selection.hasDrive()"> ng-disabled="!app.selection.hasImage() || !app.selection.hasDrive()">
<span ng-show="app.state.progress == 100 && app.writer.isBurning()">Finishing...</span> <span ng-show="app.state.progress == 100 && app.writer.isBurning()">Finishing...</span>