fix(GUI): replace Math object usage in progressButton directive (#1263)

We were using `Math.min` in a progressButton's template expression,
however such object is not exposed to the Angular expression context.
This commit is contained in:
Benedict Aas 2017-04-10 14:59:13 +01:00 committed by Juan Cruz Viotti
parent f15587807a
commit 19dd2834fb

View File

@ -3,5 +3,5 @@
'progress-button--striped': striped && striped != 'false' 'progress-button--striped': striped && striped != 'false'
}"> }">
<span class="progress-button__content" ng-transclude></span> <span class="progress-button__content" ng-transclude></span>
<span class="progress-button__bar" ng-style="{ width: Math.min(100, percentage) + '%' }"></span> <span class="progress-button__bar" ng-style="{ width: (percentage > 100 ? 100 : percentage) + '%' }"></span>
</button> </button>