mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 02:09:35 +02:00
one more fix in the same method :(
This commit is contained in:
parent
c437a9a50a
commit
7539f8f251
2 changed files with 5 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
<manifest
|
<manifest
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.geometerplus.zlibrary.ui.android"
|
package="org.geometerplus.zlibrary.ui.android"
|
||||||
android:versionCode="2050110"
|
android:versionCode="2050111"
|
||||||
android:versionName="2.5.1"
|
android:versionName="2.5.1"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
>
|
>
|
||||||
|
|
|
@ -376,9 +376,12 @@ public abstract class ZLTextView extends ZLTextViewBase {
|
||||||
|
|
||||||
private float distance2ToCursor(int x, int y, SelectionCursor.Which which) {
|
private float distance2ToCursor(int x, int y, SelectionCursor.Which which) {
|
||||||
final ZLTextSelection.Point point = getSelectionCursorPoint(myCurrentPage, which);
|
final ZLTextSelection.Point point = getSelectionCursorPoint(myCurrentPage, which);
|
||||||
|
if (point == null) {
|
||||||
|
return Floor.MAX_VALUE;
|
||||||
|
}
|
||||||
final float dX = x - point.X;
|
final float dX = x - point.X;
|
||||||
final float dY = y - point.Y;
|
final float dY = y - point.Y;
|
||||||
return point != null ? dX * dX + dY * dY : Float.MAX_VALUE;
|
return dX * dX + dY * dY;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SelectionCursor.Which findSelectionCursor(int x, int y) {
|
protected SelectionCursor.Which findSelectionCursor(int x, int y) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue