Files
openlayers/tests/Popup/test_Anchored.html
crschmidt ebc60202b7 Patch from Erik/I to fix:
Popups don't move adequately after zooming with scroll wheel
(Closes #494)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4250 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-12 20:14:14 +00:00

38 lines
1.1 KiB
HTML

<html>
<head>
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var popup;
function test_01_Popup_Anchored_default_constructor(t) {
t.plan( 4 );
popup = new OpenLayers.Popup.Anchored();
t.ok( popup instanceof OpenLayers.Popup.Anchored, "new OpenLayers.Popup.Anchored returns Popup.Anchored object" );
t.ok(popup.id.startsWith("OpenLayers.Popup.Anchored"), "valid default popupid");
var firstID = popup.id;
t.eq(popup.contentHTML, "", "good default popup.contentHTML");
popup = new OpenLayers.Popup.Anchored();
var newID = popup.id;
t.ok(newID != firstID, "default id generator creating unique ids");
}
function test_Popup_Anchored_updateRelPos(t) {
t.plan(1);
var popup = new OpenLayers.Popup.Anchored();
popup.calculateNewPx = function () {}
popup.calculateRelativePosition = function() {
t.ok(true, "update relative position is called on moveTo");
}
popup.moveTo(new OpenLayers.Pixel(0,0));
}
</script>
</head>
<body>
</body>
</html>