remove dependency on AnchoredBubble and Marker from Feature. r=marcjansen,bartvde,erilem (closes #1633)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11790 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2011-03-30 14:17:13 +00:00
parent 4d44799cc2
commit d5d21b1e71
2 changed files with 18 additions and 16 deletions
+8 -3
View File
@@ -7,7 +7,7 @@
var feature, layer;
function test_Feature_constructor (t) {
t.plan( 7 );
t.plan( 6 );
var layer = {};
var lonlat = new OpenLayers.LonLat(2,1);
@@ -26,11 +26,10 @@
t.ok( feature.lonlat.equals(lonlat), "feature.lonlat set correctly" );
t.eq( feature.data.iconURL, iconURL, "feature.data.iconURL set correctly" );
t.ok( feature.data.iconSize.equals(iconSize), "feature.data.iconSize set correctly" );
t.ok( feature.popupClass == OpenLayers.Popup.AnchoredBubble, "default popupClass is AnchoredBubble");
}
function test_Feature_createPopup (t) {
t.plan(1);
t.plan(3);
var layer = {};
var lonlat = new OpenLayers.LonLat(2,1);
var iconURL = 'http://boston.openguides.org/features/ORANGE.png';
@@ -45,6 +44,12 @@
//Safari 3 separates style overflow into overflow-x and overflow-y
var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
t.eq(popup.contentDiv.style[prop], "auto", 'overflow on popup is correct');
t.ok( popup instanceof OpenLayers.Popup.AnchoredBubble, "popup is an AnchoredBubble by defaults");
feature.destroyPopup();
feature.popupClass = OpenLayers.Popup.FramedCloud;
popup = feature.createPopup();
t.ok( popup instanceof OpenLayers.Popup.FramedCloud, "setting feature.popupClass works");
}
function test_Feature_createMarker (t) {
t.plan(1);