commit 72ec7cd2909c6f13f277b7cdc6bf82983c20d230
parent 22ef619a4cfe5049fd442b1be4d0c95eca409c98
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Thu, 8 Dec 2016 22:26:03 +0300
[configure layers] better styles and formatiing in dialog
Diffstat:
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/lib/leaflet.control.layers.configure/layers-configure.js b/src/lib/leaflet.control.layers.configure/layers-configure.js
@@ -51,6 +51,7 @@ function enableConfig(control, layers) {
}
layer.enabled = enabled;
layer.checked = ko.observable(enabled);
+ layer.description = layer.description || '';
}
this.storeEnabledLayers();
this.updateEnabledLayers();
@@ -78,7 +79,10 @@ function enableConfig(control, layers) {
<!-- ko foreach: layers -->
<label>
<input type="checkbox" data-bind="checked: checked"/>
- <span data-bind="text: title"></span>
+ <span data-bind="text: title">
+ </span><!-- ko if: description -->:
+ <span data-bind="html: description || ''"></span>
+ <!-- /ko -->
</label>
<!-- /ko -->
</form>
diff --git a/src/lib/leaflet.control.layers.configure/style.css b/src/lib/leaflet.control.layers.configure/style.css
@@ -38,6 +38,7 @@
overflow: hidden;
height: 100%;
padding: 6px 0 40px 6px;
+ min-width: 250px;
}
.leaflet-layers-select-window form {
@@ -49,10 +50,6 @@
width: auto ;
}
-.leaflet-layers-select-window * {
- white-space: nowrap;
-}
-
.leaflet-layers-select-window .buttons-row {
position: absolute;
bottom: 0;
@@ -86,5 +83,9 @@
}
.leaflet-layers-select-window a {
+ color: #000;
+}
+
+.leaflet-layers-select-window .section-header a {
color: #666;
}
\ No newline at end of file