Fix marker touch events, fix #723
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
- vtm-desktop-lwjgl module [#714](https://github.com/mapsforge/vtm/pull/714)
|
- vtm-desktop-lwjgl module [#714](https://github.com/mapsforge/vtm/pull/714)
|
||||||
- vtm-desktop-lwjgl3 module [#717](https://github.com/mapsforge/vtm/pull/717)
|
- vtm-desktop-lwjgl3 module [#717](https://github.com/mapsforge/vtm/pull/717)
|
||||||
|
- Fix marker touch events [#723](https://github.com/mapsforge/vtm/issues/723)
|
||||||
- Many other minor improvements and bug fixes
|
- Many other minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.12.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.12.0)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2012 osmdroid authors: Nicolas Gramlich, Theodore Hong, Fred Eisele
|
* Copyright 2012 osmdroid authors: Nicolas Gramlich, Theodore Hong, Fred Eisele
|
||||||
*
|
*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
* Copyright 2016 Stephan Leuschner
|
* Copyright 2016 Stephan Leuschner
|
||||||
* Copyright 2016 Pedinel
|
* Copyright 2016 Pedinel
|
||||||
*
|
*
|
||||||
@@ -212,8 +212,8 @@ public class ItemizedLayer<Item extends MarkerInterface> extends MarkerLayer<Ite
|
|||||||
|
|
||||||
mapPosition.toScreenPoint(item.getPoint(), mTmpPoint);
|
mapPosition.toScreenPoint(item.getPoint(), mTmpPoint);
|
||||||
|
|
||||||
float dx = (float) (mTmpPoint.x - eventX);
|
float dx = (float) (eventX - mTmpPoint.x);
|
||||||
float dy = (float) (mTmpPoint.y - eventY);
|
float dy = (float) (eventY - mTmpPoint.y);
|
||||||
|
|
||||||
MarkerSymbol it = item.getMarker();
|
MarkerSymbol it = item.getMarker();
|
||||||
if (it == null)
|
if (it == null)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
* Copyright 2016 Izumi Kawashima
|
* Copyright 2016 Izumi Kawashima
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
*
|
*
|
||||||
@@ -179,7 +179,7 @@ public class MarkerSymbol {
|
|||||||
h = mTextureRegion.rect.h;
|
h = mTextureRegion.rect.h;
|
||||||
}
|
}
|
||||||
float ox = -w * mOffset.x;
|
float ox = -w * mOffset.x;
|
||||||
float oy = -h * (1 - mOffset.y);
|
float oy = -h * mOffset.y;
|
||||||
|
|
||||||
return dx >= ox && dy >= oy && dx <= ox + w && dy <= oy + h;
|
return dx >= ox && dy >= oy && dx <= ox + w && dy <= oy + h;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user