[Pkg-javascript-commits] [leaflet] 63/301: Test for dragging and worldCopyJump added
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:42 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit 21a282d38b3b62d65dec7f5793d7b2818ba412cd
Author: fastrde <strachanski at googlemail.com>
Date: Sat Aug 17 13:20:12 2013 +0200
Test for dragging and worldCopyJump added
---
debug/tests/dragging_and_copyworldjump.html | 62 +++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/debug/tests/dragging_and_copyworldjump.html b/debug/tests/dragging_and_copyworldjump.html
new file mode 100644
index 0000000..8d8252f
--- /dev/null
+++ b/debug/tests/dragging_and_copyworldjump.html
@@ -0,0 +1,62 @@
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Leaflet debug page</title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+
+ <link rel="stylesheet" href="../../dist/leaflet.css" />
+ <!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
+
+ <link rel="stylesheet" href="../css/screen.css" />
+ <script type="text/javascript" src="../../build/deps.js"></script>
+ <script src="../leaflet-include.js"></script>
+ <script type='text/javascript' src='http://code.jquery.com/jquery-1.8.0.js'></script>
+ </head>
+ <body>
+ <p>
+ On the left Map dragging and worldCopyJump are enabled during initialisation.<br>
+ On the right Map worldCopyJump is enabled. Dragging is enabled by clicking the button.
+ </p>
+ <button id="foo">
+ Click to enable dragging on the right map, then dragging around and watch copying
+ </button><br>
+ <div id="map1" style="height: 300px;width: 400px; float:left;"></div>
+ <div id="map2" style="height: 300px;width: 400px; float:left; margin-left: 10px;"></div>
+ <div style="clear:both"></div>
+
+
+ <script type="text/javascript">
+ function addLayerAndMarker(map) {
+ var layer = new L.TileLayer('http://{s}.tile.cloudmade.com/d4fc77ea4a63471cab2423e66626cbb6/997/256/{z}/{x}/{y}.png', {
+ maxZoom : 18
+ }).addTo(map);
+
+ var marker = L.marker([50.5, 30.5]).addTo(map);
+
+ }
+ var map1 = new L.Map('map1', {
+ center : new L.LatLng(45.50144, -122.67599),
+ zoom : 0,
+ dragging : true,
+ worldCopyJump : true
+ });
+ var map2 = new L.Map('map2', {
+ center : new L.LatLng(45.50144, -122.67599),
+ zoom : 0,
+ dragging : false,
+ worldCopyJump : true
+ });
+ $("#foo").click(function() {
+ map2.dragging.enable();
+ });
+
+
+
+ addLayerAndMarker(map1);
+ addLayerAndMarker(map2);
+
+ </script>
+ </body>
+</html>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list