Commit 1a8579cd by carl bergquist

feat(table_panel): adds invert color order functionality

parent 5227dc67
......@@ -132,6 +132,9 @@
<spectrum-picker ng-model="style.colors[1]" ng-change="render()" ></spectrum-picker>
<spectrum-picker ng-model="style.colors[2]" ng-change="render()" ></spectrum-picker>
</li>
<li class="tight-form-item last">
<a class="pointer" ng-click="invertColorOrder($index)">invert order</a>
</li>
</ul>
<div class="clearfix"></div>
</div>
......
......@@ -101,6 +101,14 @@ export class TablePanelEditorCtrl {
});
};
$scope.invertColorOrder = function(index) {
var ref = $scope.panel.styles[index].colors;
var copy = ref[0];
ref[0] = ref[2];
ref[2] = copy;
$scope.render();
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment