Fix Bug 40281
This commit is contained in:
parent
171e0078a6
commit
1dc8508ac3
|
@ -101,6 +101,9 @@ define([
|
||||||
|
|
||||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
||||||
|
Common.NotificationCenter.on('readermode:change', function (reader) {
|
||||||
|
_startPoint = {};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
showSearch: function () {
|
showSearch: function () {
|
||||||
|
@ -121,7 +124,8 @@ define([
|
||||||
var _endPoint = pointerEventToXY(e);
|
var _endPoint = pointerEventToXY(e);
|
||||||
|
|
||||||
if (_isShow) {
|
if (_isShow) {
|
||||||
var distance = Math.sqrt((_endPoint.x -= _startPoint.x) * _endPoint.x + (_endPoint.y -= _startPoint.y) * _endPoint.y);
|
var distance = (_startPoint.x===undefined || _startPoint.y===undefined) ? 0 :
|
||||||
|
Math.sqrt((_endPoint.x -= _startPoint.x) * _endPoint.x + (_endPoint.y -= _startPoint.y) * _endPoint.y);
|
||||||
|
|
||||||
if (distance < 1) {
|
if (distance < 1) {
|
||||||
this.hideSearch();
|
this.hideSearch();
|
||||||
|
|
|
@ -121,7 +121,8 @@ define([
|
||||||
var _endPoint = pointerEventToXY(e);
|
var _endPoint = pointerEventToXY(e);
|
||||||
|
|
||||||
if (_isShow) {
|
if (_isShow) {
|
||||||
var distance = Math.sqrt((_endPoint.x -= _startPoint.x) * _endPoint.x + (_endPoint.y -= _startPoint.y) * _endPoint.y);
|
var distance = (_startPoint.x===undefined || _startPoint.y===undefined) ? 0 :
|
||||||
|
Math.sqrt((_endPoint.x -= _startPoint.x) * _endPoint.x + (_endPoint.y -= _startPoint.y) * _endPoint.y);
|
||||||
|
|
||||||
if (distance < 1) {
|
if (distance < 1) {
|
||||||
this.hideSearch();
|
this.hideSearch();
|
||||||
|
|
|
@ -120,7 +120,8 @@ define([
|
||||||
var _endPoint = pointerEventToXY(e);
|
var _endPoint = pointerEventToXY(e);
|
||||||
|
|
||||||
if (_isShow) {
|
if (_isShow) {
|
||||||
var distance = Math.sqrt((_endPoint.x -= _startPoint.x) * _endPoint.x + (_endPoint.y -= _startPoint.y) * _endPoint.y);
|
var distance = (_startPoint.x===undefined || _startPoint.y===undefined) ? 0 :
|
||||||
|
Math.sqrt((_endPoint.x -= _startPoint.x) * _endPoint.x + (_endPoint.y -= _startPoint.y) * _endPoint.y);
|
||||||
|
|
||||||
if (distance < 1) {
|
if (distance < 1) {
|
||||||
this.hideSearch();
|
this.hideSearch();
|
||||||
|
|
Loading…
Reference in a new issue