Changeset 3893
- Timestamp:
- 08/11/07 11:26:40 (1 year ago)
- Files:
-
- sandbox/tschaub/wfsv/lib/OpenLayers/Control/BoundsBox.js (modified) (2 diffs)
- sandbox/tschaub/wfsv/lib/OpenLayers/Control/FeatureEditor.js (modified) (3 diffs)
- sandbox/tschaub/wfsv/lib/OpenLayers/Handler.js (modified) (2 diffs)
- sandbox/tschaub/wfsv/lib/OpenLayers/Handler/Box.js (modified) (2 diffs)
- sandbox/tschaub/wfsv/lib/OpenLayers/Handler/Drag.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/tschaub/wfsv/lib/OpenLayers/Control/BoundsBox.js
r3881 r3893 48 48 * Parameters: 49 49 * position - {<OpenLayers.Bounds>} or {<OpenLayers.Pixel>} 50 * evt - {Event} The browser event that finished the box.51 50 */ 52 returnBounds: function(position , evt) {51 returnBounds: function(position) { 53 52 var bounds; 54 53 if(position instanceof OpenLayers.Bounds) { … … 66 65 center.lon, center.lat); 67 66 } 68 this.callback.apply(this.target, [bounds , evt]);67 this.callback.apply(this.target, [bounds]); 69 68 }, 70 69 sandbox/tschaub/wfsv/lib/OpenLayers/Control/FeatureEditor.js
r3890 r3893 176 176 * Parameters: 177 177 * bounds - {<OpenLayers.Bounds>} 178 * evt - {Event} 179 */ 180 prepareRequest: function(bounds, evt) { 178 */ 179 prepareRequest: function(bounds) { 181 180 var params = { 182 181 service: "WFS", … … 190 189 var url = this.url + "?" + OpenLayers.Util.getParameterString(params); 191 190 192 // evt passed along for modifiers - find a better solution 193 this.requestFeatures(url, evt); 191 this.requestFeatures(url); 194 192 }, 195 193 … … 200 198 * Parameters: 201 199 * url - {String} 202 * evt - {Event} 203 */ 204 requestFeatures: function(url, evt) { 200 */ 201 requestFeatures: function(url) { 205 202 var callback; 203 var evt = this.featuresControl.handler.evt; 206 204 if(evt.shiftKey) { 207 205 callback = this.addFeatures; sandbox/tschaub/wfsv/lib/OpenLayers/Handler.js
r3839 r3893 199 199 register: function (name, method) { 200 200 // TODO: deal with registerPriority in 3.0 201 this.map.events.registerPriority(name, this, method); 201 this.map.events.registerPriority(name, this, method); 202 this.map.events.registerPriority(name, this, this.setEvent); 202 203 }, 203 204 … … 208 209 unregister: function (name, method) { 209 210 this.map.events.unregister(name, this, method); 211 this.map.events.unregister(name, this, this.setEvent); 212 }, 213 214 /** 215 * Method: setEvent 216 * With each registered browser event, the handler sets its own evt 217 * property. This property can be accessed by controls if needed 218 * to get more information about the event that the handler is 219 * processing. 220 * 221 * This allows modifier keys on the event to be checked (alt, shift, 222 * and ctrl cannot be checked with the keyboard handler). For a 223 * control to determine which modifier keys are associated with the 224 * event that a handler is currently processing, it should access 225 * (code)handler.evt.altKey || handler.evt.shiftKey || 226 * handler.evt.ctrlKey(end). 227 * 228 * Parameters: 229 * evt - {Event} The browser event. 230 */ 231 setEvent: function(evt) { 232 this.evt = evt; 233 return true; 210 234 }, 211 235 sandbox/tschaub/wfsv/lib/OpenLayers/Handler/Box.js
r3879 r3893 98 98 * Method: endBox 99 99 */ 100 endBox: function(end , evt) {100 endBox: function(end) { 101 101 var result; 102 102 if (Math.abs(this.dragHandler.start.x - end.x) > 5 || … … 116 116 this.map.div.style.cursor = ""; 117 117 118 this.callback("done", [result , evt]);118 this.callback("done", [result]); 119 119 }, 120 120 sandbox/tschaub/wfsv/lib/OpenLayers/Handler/Drag.js
r3879 r3893 94 94 // TBD replace with CSS classes 95 95 this.map.div.style.cursor = "move"; 96 this.callback("down", [evt.xy , evt]);96 this.callback("down", [evt.xy]); 97 97 OpenLayers.Event.stop(evt); 98 98 return false; … … 114 114 if (this.started) { 115 115 this.dragging = true; 116 this.callback("move", [evt.xy , evt]);116 this.callback("move", [evt.xy]); 117 117 if(!this.oldOnselectstart) { 118 118 this.oldOnselectstart = document.onselectstart; … … 138 138 // TBD replace with CSS classes 139 139 this.map.div.style.cursor = ""; 140 this.callback("up", [evt.xy , evt]);141 this.callback("done", [evt.xy , evt]);140 this.callback("up", [evt.xy]); 141 this.callback("done", [evt.xy]); 142 142 document.onselectstart = this.oldOnselectstart; 143 143 } … … 161 161 // TBD replace with CSS classes 162 162 this.map.div.style.cursor = ""; 163 this.callback("out", [ evt]);163 this.callback("out", []); 164 164 if(document.onselectstart) { 165 165 document.onselectstart = this.oldOnselectstart; 166 166 } 167 this.callback("done", [evt.xy , evt])167 this.callback("done", [evt.xy]) 168 168 } 169 169 return true;
