summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2014-05-19 13:30:04 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-05-19 13:30:04 +0900
commit734696fe99ee286ffceaf5ac4aa2f34b79d1bc7f (patch)
treee2ba650b8771cb9af21506a1ece42b451259ea64
parent4b583c0892c6d9683eabc665bf060f87be81f86f (diff)
elm_map: Fix to calculate map size not to be smaller than viewport size
Summary: Fix to calculator map size not to be smaller than viewport size when zoom mode is either fit or fill. Previously, map size could be either smaller or larger than viewport. @fix Reviewers: Hermet, raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D861
-rw-r--r--src/lib/elm_map.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index b352b5233..393ba8d89 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -3609,6 +3609,7 @@ _zoom_mode_set(Elm_Map_Data *sd, double zoom)
3609 w = pow(2.0, zoom) * sd->tsize; 3609 w = pow(2.0, zoom) * sd->tsize;
3610 h = pow(2.0, zoom) * sd->tsize; 3610 h = pow(2.0, zoom) * sd->tsize;
3611 } 3611 }
3612 zoom -= diff;
3612 } 3613 }
3613 } 3614 }
3614 else if (sd->mode == ELM_MAP_ZOOM_MODE_AUTO_FILL) 3615 else if (sd->mode == ELM_MAP_ZOOM_MODE_AUTO_FILL)
@@ -3632,6 +3633,7 @@ _zoom_mode_set(Elm_Map_Data *sd, double zoom)
3632 w = pow(2.0, zoom) * sd->tsize; 3633 w = pow(2.0, zoom) * sd->tsize;
3633 h = pow(2.0, zoom) * sd->tsize; 3634 h = pow(2.0, zoom) * sd->tsize;
3634 } 3635 }
3636 zoom -= diff;
3635 } 3637 }
3636 } 3638 }
3637 _zoom_do(sd, zoom); 3639 _zoom_do(sd, zoom);