Commit c0cf0cb8 by Qtax Committed by bergquist

Added an option to set a min-width for the graphs side table/area.

parent 311624be
...@@ -181,6 +181,13 @@ ...@@ -181,6 +181,13 @@
<li class="tight-form-item"> <li class="tight-form-item">
<editor-checkbox text="Right side" model="panel.legend.rightSide" change="render()"></editor-checkbox> <editor-checkbox text="Right side" model="panel.legend.rightSide" change="render()"></editor-checkbox>
</li> </li>
<li ng-if="panel.legend.rightSide" class="tight-form-item">
Side width
</li>
<li ng-if="panel.legend.rightSide" style="width: 105px">
<input type="number" class="input-small tight-form-input" placeholder="250" bs-tooltip="'Set a min-width for the legend side table/block'" data-placement="right"
ng-model="panel.legend.sideWidth" ng-change="render()" ng-model-onblur>
</li>
</ul> </ul>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
......
...@@ -101,6 +101,10 @@ function (angular, _, $) { ...@@ -101,6 +101,10 @@ function (angular, _, $) {
$container.empty(); $container.empty();
// Set min-width if side style and there is a value, otherwise remove the CSS propery
var width = panel.legend.rightSide && panel.legend.sideWidth ? panel.legend.sideWidth + "px" : "";
$container.css("min-width", width);
$container.toggleClass('graph-legend-table', panel.legend.alignAsTable === true); $container.toggleClass('graph-legend-table', panel.legend.alignAsTable === true);
if (panel.legend.alignAsTable) { if (panel.legend.alignAsTable) {
......
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