OpenLayers OpenLayers

Ticket #1403 (closed bug: fixed)

Opened 9 months ago

Last modified 9 months ago

Map move events are screwy

Reported by: euzuro Assigned to:
Priority: blocker Milestone: 2.6 Release
Component: Map Version: 2.5
Keywords: Cc:
State: Complete

Description

In examples/lite.html's init() function, register the following two events so we can track the "movestart" and "moveend" events:

	        map.events.register("moveend", null, function() {
	            console.log("end");
	        });
	        map.events.register("movestart", null, function() {
	            console.log("start");
	        });

Now open lite.html in firefox and open the firebug console.

click and drag the map: notice that start and end both fire at the *end* of the drag

now click on one of the arrows in the panzoombar. start fires at beginning of pan, end at the end of it. beautiful.

now click and drag the map again: we get an end fired at the beginning of the drag, then the start and end as before at the end.

Attachments

stop_playing.patch (507 bytes) - added by crschmidt on 02/28/08 13:44:16.
bring_back_dragging.patch (1.0 kB) - added by crschmidt on 02/28/08 13:47:39.

Change History

02/28/08 13:38:34 changed by crschmidt

Tim actually fixed at least part of this: r5674

I broke it accidentally: r6099

02/28/08 13:44:16 changed by crschmidt

  • attachment stop_playing.patch added.

02/28/08 13:44:53 changed by crschmidt

Attached patch solves the double-moveend: Specifically, we need to tell panTween we're not playing anymore after calling 'done', not just when 'stop' is called -- stop is more well termed 'cancel', which is not called regularly.

02/28/08 13:47:39 changed by crschmidt

  • attachment bring_back_dragging.patch added.

02/28/08 13:48:47 changed by crschmidt

Bring back dragging, in a slightly different way so that we can actually fix this bug with one stone

02/28/08 14:44:31 changed by euzuro

  • state set to Commit.

brilliant.

all tests pass ie6, ff. please commit.

thank you, infinitely. great work

02/28/08 14:47:50 changed by crschmidt

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.