Kaydet (Commit) 4d197ba4 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

LOAndroid3: don't update viewport if scrolled by (0,0)

Change-Id: I299ebf08d77c7f2a35ed551dfcdf17fa8d0a8d79
üst 6e1aa919
...@@ -275,6 +275,10 @@ public class LayerController { ...@@ -275,6 +275,10 @@ public class LayerController {
* Scrolls the viewport by the given offset. You must hold the monitor while calling this. * Scrolls the viewport by the given offset. You must hold the monitor while calling this.
*/ */
public void scrollBy(PointF point) { public void scrollBy(PointF point) {
if (point.equals(0,0)) {
return;
}
PointF origin = mViewportMetrics.getOrigin(); PointF origin = mViewportMetrics.getOrigin();
origin.offset(point.x, point.y); origin.offset(point.x, point.y);
mViewportMetrics.setOrigin(origin); mViewportMetrics.setOrigin(origin);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment