OpenLayers OpenLayers

Ticket #638: patch.txt

File patch.txt, 1.7 kB (added by openlayers, 1 year ago)

patch to fix a cosmetic bug

Line 
1 Index: C:/projects/workspace/tschaub-feature/lib/OpenLayers/Control/DragFeature.js
2 ===================================================================
3 --- C:/projects/workspace/tschaub-feature/lib/OpenLayers/Control/DragFeature.js (revision 3330)
4 +++ C:/projects/workspace/tschaub-feature/lib/OpenLayers/Control/DragFeature.js (working copy)
5 @@ -83,6 +83,7 @@
6          this.layer = layer;
7          this.dragCallbacks = OpenLayers.Util.extend({down: this.downFeature,
8                                                       move: this.moveFeature,
9 +                                                     over: this.overCallback,
10                                                       up: this.upFeature,
11                                                       out: this.cancel
12                                                      }, this.dragCallbacks);
13 @@ -151,6 +152,15 @@
14              }
15          }
16      },
17 +   
18 +    /**
19 +     * Called when the feature handler needs to be reinitialized,
20 +     * for example when the click operation has ended.
21 +     *
22 +     */
23 +    overCallback: function() {
24 +       this.overFeature(this.feature);
25 +    },
26  
27      /**
28       * Called when the drag handler detects a mouse-down.
29 Index: C:/projects/workspace/tschaub-feature/lib/OpenLayers/Handler/Drag.js
30 ===================================================================
31 --- C:/projects/workspace/tschaub-feature/lib/OpenLayers/Handler/Drag.js    (revision 3330)
32 +++ C:/projects/workspace/tschaub-feature/lib/OpenLayers/Handler/Drag.js    (working copy)
33 @@ -98,6 +98,8 @@
34              this.callback("up", [evt.xy]);
35              document.onselectstart = this.oldOnselectstart;
36          }
37 +        this.dragging = false;
38 +        this.callback("over");
39          return true;
40      },
41