Fixed problems with touch events on a scrollable page
This commit is contained in:
+17
-2
@@ -1,6 +1,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#map {
|
||||
position: absolute;
|
||||
top: 1234px;
|
||||
left: 123px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var OpenLayers = [
|
||||
"OpenLayers/BaseTypes/Class.js",
|
||||
@@ -99,10 +110,14 @@
|
||||
}
|
||||
|
||||
function test_Util_pagePosition(t) {
|
||||
t.plan( 1 );
|
||||
t.plan( 2 );
|
||||
var pp = OpenLayers.Util.pagePosition(window);
|
||||
t.eq( pp.toString(), "0,0", "Page position doesn't bail if passed 'window'")
|
||||
t.eq( pp.toString(), "0,0", "Page position doesn't bail if passed 'window'");
|
||||
|
||||
window.scrollTo(100, 1200);
|
||||
var mapDiv = document.getElementById("map");
|
||||
pp = OpenLayers.Util.pagePosition(mapDiv);
|
||||
t.eq( pp.toString(), "123,1234", "Page position should work after page has been scrolled");
|
||||
}
|
||||
|
||||
function test_Util_createDiv(t) {
|
||||
|
||||
Reference in New Issue
Block a user