diff --git a/src/mapml.css b/src/mapml.css index de1152952..7d30ecbab 100644 --- a/src/mapml.css +++ b/src/mapml.css @@ -203,13 +203,21 @@ display: inline; } -.leaflet-control-layers-overlays > fieldset > .mapml-layer-item-settings > .mapml-control-layers > summary ~ * { +.mapml-control-layers > :not(summary) { display: block; - margin-top: 5px; - margin-left: 15px; + margin-block-start: 5px; + margin-inline-start: 15px; width: calc(100% - 15px); } +.mapml-layer-item-style > div { + display: flex; +} + +.mapml-layer-item-style input { + margin-inline-start: 0; +} + .leaflet-control-layers-list .leaflet-control-layers-overlays > :not(:last-of-type) { border-bottom: 1px solid #e3e3e3; } @@ -385,7 +393,8 @@ .leaflet-control, .mapml-contextmenu, .mapml-debug, -.mapml-focus-buttons { +.mapml-focus-buttons, +.mapml-layer-item-settings summary { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; @@ -673,14 +682,15 @@ button.mapml-button:disabled, width: 44px; } -.mapml-layer-item-toggle{ - display: inline-flex !important; - width: 100%; +label.mapml-layer-item-toggle { + display: inline-flex; + align-items: center; } .mapml-layer-item-name { word-break: break-word; - text-align: inline-start; + padding-block-start: .25rem; + padding-block-end: .25rem; padding-inline-start: .25rem; padding-inline-end: 1rem; } @@ -692,14 +702,3 @@ button.mapml-button:disabled, padding-inline-start: 2rem; padding-inline-end: 1rem; } - -.mapml-layer-item-settings summary { - -webkit-user-select: none; - user-select: none; -} - -.mapml-layer-item-opacity [type="range"] { - margin-inline-end: 0; - margin-inline-start: 0; - width: 100%; -} \ No newline at end of file diff --git a/src/mapml/layers/MapLayer.js b/src/mapml/layers/MapLayer.js index 9459a67d6..f6fa7322d 100644 --- a/src/mapml/layers/MapLayer.js +++ b/src/mapml/layers/MapLayer.js @@ -489,7 +489,7 @@ export var MapMLLayer = L.Layer.extend({ layerItemSettings = L.DomUtil.create('div', 'mapml-layer-item-settings', fieldset), itemToggleLabel = L.DomUtil.create('label', 'mapml-layer-item-toggle', layerItemProperty), layerItemControls = L.DomUtil.create('div', 'mapml-layer-item-controls', layerItemProperty), - opacityControl = L.DomUtil.create('details', 'mapml-layer-item-opacity', layerItemSettings), + opacityControl = L.DomUtil.create('details', 'mapml-layer-item-opacity mapml-control-layers', layerItemSettings), opacity = L.DomUtil.create('input'), opacityControlSummary = L.DomUtil.create('summary'), svgSettingsControlIcon = L.SVG.create('svg'), @@ -654,7 +654,7 @@ export var MapMLLayer = L.Layer.extend({ // don't add it again if it is referenced > once if (mapmlInput.tagName.toLowerCase() === 'map-select' && !frag.querySelector(id)) { // generate a
- var selectdetails = L.DomUtil.create('details', 'mapml-control-layers', frag), + var selectdetails = L.DomUtil.create('details', 'mapml-layer-item-time mapml-control-layers', frag), selectsummary = L.DomUtil.create('summary'), selectSummaryLabel = L.DomUtil.create('label'); selectSummaryLabel.innerText = mapmlInput.getAttribute('name'); @@ -939,7 +939,7 @@ export var MapMLLayer = L.Layer.extend({ }; for (var j=0;j