Gutting the OverviewMap control to give it an update. Now uses a click handler and a drag handler instead of its own event handling code. In addition, the control now has a minRecSize property. When the extent rectangle is smaller than the specified size, its style is switched. By default, we provide a rectangle replacement graphic. This can be customized with CSS. Finally, I'm tucking in one non-API property. The dragging arg sent to map.setCenter is now stored at map.dragging. This gives easy reference to dragging state where a reference to the navigation control and its drag handler is not convenient. r=pspencer (closes #1244)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -51,9 +51,12 @@
|
||||
t.eq(cent.lon, -71.3515625, "Clicking on the Overview Map has the correct effect on map lon");
|
||||
t.eq(cent.lat, 42.17578125, "Clicking on the Overview Map has the correct effect on map lat");
|
||||
|
||||
control.rectMouseDown({'xy':new OpenLayers.Pixel(5,5), 'which':1});
|
||||
control.rectMouseMove({'xy':new OpenLayers.Pixel(15,15), 'which':1});
|
||||
control.rectMouseUp({'xy':new OpenLayers.Pixel(15,15), 'which':1});
|
||||
control.dragHandler = {
|
||||
last: new OpenLayers.Pixel(5,5),
|
||||
destroy: function() {}
|
||||
};
|
||||
control.rectDrag(new OpenLayers.Pixel(15, 15));
|
||||
control.updateMapToRect();
|
||||
|
||||
var cent = map.getCenter();
|
||||
t.eq(cent.lon, -71.2734375, "Dragging on the Overview Map has the correct effect on map lon");
|
||||
|
||||
Reference in New Issue
Block a user