Commit 5bd128ba by Torkel Ödegaard

Merge pull request #3493 from bergquist/table_panel_color_invert_order

Table Panel: adds invert color order functionality
parents 5921bb05 1a8579cd
......@@ -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