vendor/assets/stylesheets/leaflet.css.erb in leaflet-rails-1.0.0.pre.rc1 vs vendor/assets/stylesheets/leaflet.css.erb in leaflet-rails-1.0.0.pre.rc2

- old
+ new

@@ -17,12 +17,10 @@ left: 0; top: 0; } .leaflet-container { overflow: hidden; - -ms-touch-action: none; - touch-action: none; } .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { -webkit-user-select: none; @@ -50,10 +48,22 @@ .leaflet-container .leaflet-marker-pane img, .leaflet-container .leaflet-tile-pane img, .leaflet-container img.leaflet-image-layer { max-width: none !important; } + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + } +.leaflet-container.leaflet-touch-drag.leaflet-touch-drag { + -ms-touch-action: none; + touch-action: none; +} .leaflet-tile { filter: inherit; visibility: hidden; } .leaflet-tile-loaded { @@ -75,10 +85,11 @@ .leaflet-tile-pane { z-index: 200; } .leaflet-overlay-pane { z-index: 400; } .leaflet-shadow-pane { z-index: 500; } .leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } .leaflet-popup-pane { z-index: 700; } .leaflet-map-pane canvas { z-index: 100; } .leaflet-map-pane svg { z-index: 200; } @@ -96,10 +107,11 @@ /* control positioning */ .leaflet-control { position: relative; z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ pointer-events: auto; } .leaflet-top, .leaflet-bottom { position: absolute; @@ -216,10 +228,11 @@ } .leaflet-marker-icon.leaflet-interactive, .leaflet-image-layer.leaflet-interactive, .leaflet-pane > svg path.leaflet-interactive { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ pointer-events: auto; } /* visual tweaks */ @@ -431,10 +444,11 @@ /* popup */ .leaflet-popup { position: absolute; text-align: center; + margin-bottom: 20px; } .leaflet-popup-content-wrapper { padding: 1px; text-align: left; border-radius: 12px; @@ -445,15 +459,17 @@ } .leaflet-popup-content p { margin: 18px 0; } .leaflet-popup-tip-container { - margin: 0 auto; width: 40px; height: 20px; - position: relative; + position: absolute; + left: 50%; + margin-left: -20px; overflow: hidden; + pointer-events: none; } .leaflet-popup-tip { width: 17px; height: 17px; padding: 1px; @@ -521,6 +537,73 @@ /* div icon */ .leaflet-div-icon { background: #fff; border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-clickable { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; }