Ticket #967: patch-967-A1.diff
| File patch-967-A1.diff, 1.7 kB (added by elemoine, 1 year ago) |
|---|
-
lib/OpenLayers/Map.js
old new 1028 1028 * Parameters: 1029 1029 * lonlat - {<OpenLayers.LonLat>} 1030 1030 * zoom - {Integer} 1031 * dragging - {Boolean} Specifies whether or not to trigger 1032 * movestart/end events 1031 * dragging - {Boolean} Specifies whether the map is being dragged 1033 1032 * forceZoomChange - {Boolean} Specifies whether or not to trigger zoom 1034 1033 * change events (needed on baseLayer change) 1034 * noEvent - {Boolean} prevent movestart/end evens 1035 1035 * 1036 1036 * TBD: reconsider forceZoomChange in 3.0 1037 1037 */ 1038 setCenter: function (lonlat, zoom, dragging, forceZoomChange ) {1038 setCenter: function (lonlat, zoom, dragging, forceZoomChange, noEvent) { 1039 1039 1040 1040 if (!this.center && !this.isValidLonLat(lonlat)) { 1041 1041 lonlat = this.maxExtent.getCenterLonLat(); … … 1052 1052 // if neither center nor zoom will change, no need to do anything 1053 1053 if (zoomChanged || centerChanged || !dragging) { 1054 1054 1055 if (!dragging) { this.events.triggerEvent("movestart"); } 1055 if (!dragging && !noEvent) { 1056 this.events.triggerEvent("movestart"); 1057 } 1056 1058 1057 1059 if (centerChanged) { 1058 1060 if ((!zoomChanged) && (this.center)) { … … 1120 1122 } 1121 1123 1122 1124 // even if nothing was done, we want to notify of this 1123 if (!dragging) { this.events.triggerEvent("moveend"); } 1125 if (!dragging && !noEvent) { 1126 this.events.triggerEvent("moveend"); 1127 } 1124 1128 }, 1125 1129 1126 1130 /**
