elm_map: Fix to calculate map size not to be smaller than viewport size
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 19 May 2014 04:30:04 +0000 (13:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 19 May 2014 04:30:04 +0000 (13:30 +0900)
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

legacy/elementary/src/lib/elm_map.c

index b352b52..393ba8d 100644 (file)
@@ -3609,6 +3609,7 @@ _zoom_mode_set(Elm_Map_Data *sd, double zoom)
                        w = pow(2.0, zoom) * sd->tsize;
                        h = pow(2.0, zoom) * sd->tsize;
                     }
+                  zoom -= diff;
                }
           }
         else if (sd->mode == ELM_MAP_ZOOM_MODE_AUTO_FILL)
@@ -3632,6 +3633,7 @@ _zoom_mode_set(Elm_Map_Data *sd, double zoom)
                        w = pow(2.0, zoom) * sd->tsize;
                        h = pow(2.0, zoom) * sd->tsize;
                     }
+                  zoom -= diff;
                }
           }
         _zoom_do(sd, zoom);