Skip to content

Commit

Permalink
Merge branch 'master' into 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasb committed Oct 31, 2013
2 parents e83cd54 + 6a21866 commit e3f289a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/touch.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<![endif]-->
</head>
<body>
<div id="map"></div>
<div id="map" class="leaflet-touch"></div>
<script src="lib/Leaflet/dist/leaflet-src.js"></script>
<script src="../src/L.Control.Zoomslider.js" ></script>
<script src="lib/leaflet-tilejson/src/tilejson.js"></script>
Expand Down
12 changes: 7 additions & 5 deletions src/L.Control.Zoomslider.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@
background-position: 10px 0px;
}
.leaflet-touch .leaflet-control-zoomslider-knob {
width:16px;
margin-left: -1px;
width: 16px;
margin-left: -7px;
}
.leaflet-touch .leaflet-control-zoomslider a {
width: 30px;
height: 30px;
line-height: 30px;
}
.leaflet-touch .leaflet-control-zoomslider a:hover {
width: 30px;
line-height: 30px;
}
.leaflet-touch .leaflet-control-zoomslider-in {
font-size: 24px;
Expand All @@ -97,7 +101,5 @@
}
.leaflet-touch .leaflet-control-zoomslider {
box-shadow: none;
}
.leaflet-touch .leaflet-control-zoomslider {
border: 4px solid rgba(0,0,0,0.3);
}
3 changes: 1 addition & 2 deletions src/L.Control.Zoomslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ L.Control.Zoomslider = (function () {

_onSliderClick: function (e) {
var first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),
y = L.DomEvent.getMousePosition(first).y
- L.DomUtil.getViewportOffset(this._ui.body).y; // Cache this?
y = L.DomEvent.getMousePosition(first, this._ui.body).y;

this._knob.setPosition(y);
this._updateMapZoom();
Expand Down

0 comments on commit e3f289a

Please sign in to comment.