[OpenLayers-Trac] Re: [OpenLayers] #3272: Handler.Path: It is not
possible to draw accurately
OpenLayers
trac-20090302 at openlayers.org
Fri Apr 22 11:56:10 EDT 2011
#3272: Handler.Path: It is not possible to draw accurately
--------------------------+-------------------------------------------------
Reporter: jorix | Owner: tschaub
Type: bug | Status: new
Priority: critical | Milestone: 2.11 Release
Component: Handler.Path | Version: SVN
Keywords: | State:
--------------------------+-------------------------------------------------
Comment(by jorix):
Replying to [comment:2 erilem]:
> Good catch. This has to do with the {{{pixelTolerance}}} and/or
{{{dblclickTolerance}}} (setting {{{dblclickTolerance}}} to zero seems to
fix the problem). We need to revisit our default values, and possibly the
logic.
This regression introduced in "work on touch" r11563 but refactored in
r11773
I think the changes in "up" can be partially removed as follows:
{{{
--- lib/OpenLayers/Handler/Path.js (revisión: 11907)
+++ lib/OpenLayers/Handler/Path.js (copia de trabajo)
@@ -323,8 +323,7 @@
* {Boolean} Allow event propagation
*/
up: function (evt) {
- if (this.mouseDown && (!this.lastUp || !this.passesTolerance(
- this.lastUp, evt.xy, this.dblclickTolerance))) {
+ if (this.mouseDown && (!this.lastUp ||
!this.lastUp.equals(evt.xy))) {
if(this.stoppedDown && this.freehandMode(evt)) {
this.removePoint();
this.finalize();
}}}
without compromising touching operation.
This seems to work correctly with the mouse.
But now I have no way to test on a touch device :(
NOTE: They fail two tests (test_sequence1 and test_sequence2) but if you
use the point (6,6) instead of (1,1), tests work (this is due to
pixelTolerance:5)
--
Ticket URL: <http://trac.openlayers.org/ticket/3272#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list