converting color number slider to number input

This commit is contained in:
ppisljar 2016-12-09 20:19:59 +01:00
parent 26bd2e97a5
commit 45ba2b95b7
2 changed files with 10 additions and 7 deletions

View file

@ -62,13 +62,13 @@
<div class="kuiSideBarFormRow__control">
<input
id="colorsNumber"
type="range"
step="1"
min="2"
max="10"
class="kuiInput kuiSideBarInput"
ng-model="vis.params.colorsNumber"
/>
type="number"
ng-required="vis.params.setColorRange"
greater-than="1"
less-than="11"
>
</div>
</div>
@ -148,7 +148,7 @@
Rotate
</label>
<div class="kuiSideBarFormRow__control">
<input class="kuiCheckBox" id="rotateLabels" type="checkbox" ng-model="rotateLabels">
<input class="kuiCheckBox" id="rotateLabels" type="checkbox" ng-model="options.labels">
</div>
</div>
</div>

View file

@ -11,8 +11,11 @@ module.directive('heatmapOptions', function ($parse, $compile, getAppState) {
link: function ($scope) {
$scope.isColorRangeOpen = true;
$scope.customColors = false;
$scope.options = {
labels: false
};
$scope.$watch('rotateLabels', rotate => {
$scope.$watch('options.labels', rotate => {
$scope.vis.params.valueAxes[0].labels.rotate = rotate ? 270 : 0;
});