"MousePosition control should support mouseOut event", r=bartvde,
initial patch cmoullet, (Closes #2404) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10127 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -10,21 +10,6 @@
|
||||
t.ok( control instanceof OpenLayers.Control.MousePosition, "new OpenLayers.Control returns object" );
|
||||
t.eq( control.displayClass, "olControlMousePosition", "displayClass is correct" );
|
||||
}
|
||||
function test_redraw_noLayer_displayProjection(t) {
|
||||
t.plan(2);
|
||||
control = new OpenLayers.Control.MousePosition({'displayProjection': new OpenLayers.Projection("WGS84")});
|
||||
map = new OpenLayers.Map('map');
|
||||
map.addControl(control);
|
||||
control.redraw({'xy': new OpenLayers.Pixel(10,10)});
|
||||
control.redraw({'xy': new OpenLayers.Pixel(12,12)});
|
||||
t.eq(control.div.innerHTML, "", "innerHTML set correctly");
|
||||
l = new OpenLayers.Layer('name', {'isBaseLayer': true});
|
||||
map.addLayer(l);
|
||||
map.zoomToMaxExtent();
|
||||
control.redraw({'xy': new OpenLayers.Pixel(10,10)});
|
||||
control.redraw({'xy': new OpenLayers.Pixel(12,12)});
|
||||
t.eq(control.div.innerHTML, "-175.78125, 85.78125", "innerHTML set correctly when triggered.");
|
||||
}
|
||||
function test_destroy(t) {
|
||||
t.plan(1);
|
||||
|
||||
@@ -52,14 +37,17 @@
|
||||
map.destroy();
|
||||
}
|
||||
function test_redraw_noLayer_displayProjection(t) {
|
||||
t.plan(3);
|
||||
var control = new OpenLayers.Control.MousePosition();
|
||||
t.plan(4);
|
||||
var control = new OpenLayers.Control.MousePosition({'emptyString':''});
|
||||
var map = new OpenLayers.Map('map');
|
||||
map.addControl(control);
|
||||
t.eq(control.div.innerHTML, "0.00000, 0.00000", "innerHTML set correctly");
|
||||
var control2 = new OpenLayers.Control.MousePosition();
|
||||
map.addControl(control2);
|
||||
t.eq(control2.emptyString, null, "Emptystring is null");
|
||||
t.eq(control.div.innerHTML, "", "innerHTML set correctly");
|
||||
control.redraw({'xy': new OpenLayers.Pixel(10,10)});
|
||||
control.redraw({'xy': new OpenLayers.Pixel(12,12)});
|
||||
t.eq(control.div.innerHTML, "0.00000, 0.00000", "innerHTML set correctly");
|
||||
t.eq(control.div.innerHTML, "", "innerHTML set correctly");
|
||||
var l = new OpenLayers.Layer('name', {'isBaseLayer': true});
|
||||
map.addLayer(l);
|
||||
map.zoomToMaxExtent();
|
||||
|
||||
Reference in New Issue
Block a user