]> git.openstreetmap.org Git - rails.git/commitdiff
Support maximize/minimize (systemed/iD#1327)
authorJohn Firebaugh <john.firebaugh@gmail.com>
Fri, 19 Apr 2013 22:34:06 +0000 (15:34 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Fri, 3 May 2013 17:52:43 +0000 (10:52 -0700)
app/views/site/id_iframe.html.erb

index 3069130685e80bec9bcbce6ae4be4eb34a33a7b1..515c0e8072ab423e31506294e9d29cd8dce93b48 100644 (file)
         Math.max(data.zoom || 15, 13));
     });
 
+    var maximized = false;
+    id.on('toggleFullscreen.embed', function() {
+      if (maximized) {
+        parent.minimiseMap();
+      } else {
+        parent.maximiseMap();
+      }
+      maximized = !maximized;
+    });
+
     d3.select('#id-container')
       .call(id.ui());
   }