Make the image resize and rotate handles larger in a mobile app
This commit is contained in:
parent
eb332fdde0
commit
3e0ae523da
2 changed files with 5 additions and 1 deletions
|
@ -14,6 +14,8 @@ L.CircleMarker = L.Path.extend({
|
|||
L.setOptions(this, options);
|
||||
this._latlng = L.latLng(latlng);
|
||||
this._radius = this.options.radius;
|
||||
if (window.ThisIsAMobileApp)
|
||||
this._radius *= 3;
|
||||
},
|
||||
|
||||
setLatLng: function (latlng) {
|
||||
|
@ -28,6 +30,8 @@ L.CircleMarker = L.Path.extend({
|
|||
|
||||
setRadius: function (radius) {
|
||||
this.options.radius = this._radius = radius;
|
||||
if (window.ThisIsAMobileApp)
|
||||
this._radius *= 3;
|
||||
return this.redraw();
|
||||
},
|
||||
|
||||
|
|
|
@ -534,7 +534,7 @@ L.Handler.PathTransform = L.Handler.extend({
|
|||
L.PathTransform.pointOnLine(
|
||||
map.latLngToLayerPoint(bottom),
|
||||
map.latLngToLayerPoint(topPoint),
|
||||
this.options.handleLength)
|
||||
(window.ThisIsAMobileApp ? this.options.handleLength * 3 : this.options.handleLength))
|
||||
);
|
||||
|
||||
this._handleLine = new L.Polyline([topPoint, handlerPosition],
|
||||
|
|
Loading…
Reference in a new issue