OpenLayers OpenLayers

Changeset 6398

Show
Ignore:
Timestamp:
02/28/08 14:47:38 (11 months ago)
Author:
crschmidt
Message:

Improve calls to movestart/moveend so that they happen at the start/end of
moves. This includes fixing pantween to set playing to false after it is
done, and fixing the map to store its dragging state again so we can use
it to figure out when a move has started.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Map.js

    r6387 r6398  
    14501450        if (zoomChanged || centerChanged || !dragging) { 
    14511451 
    1452             if (!dragging && !noEvent) { 
     1452            if (!this.dragging && !noEvent) { 
    14531453                this.events.triggerEvent("movestart"); 
    14541454            } 
     
    15231523            this.events.triggerEvent("moveend"); 
    15241524        } 
     1525         
     1526        // Store the map dragging state for later use 
     1527        this.dragging = !!dragging;  
     1528 
    15251529    }, 
    15261530 
  • trunk/openlayers/lib/OpenLayers/Tween.js

    r6388 r6398  
    147147            if (this.callbacks && this.callbacks.done) { 
    148148                this.callbacks.done.call(this, this.finish); 
     149                this.playing = false; 
    149150            } 
    150151            window.clearInterval(this.interval);