From a9386e843d0804c03636841488b217303156dbf7 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 19 Apr 2013 15:34:06 -0700 Subject: [PATCH] Support maximize/minimize (systemed/iD#1327) --- app/views/site/id_iframe.html.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/views/site/id_iframe.html.erb b/app/views/site/id_iframe.html.erb index 306913068..515c0e807 100644 --- a/app/views/site/id_iframe.html.erb +++ b/app/views/site/id_iframe.html.erb @@ -52,6 +52,16 @@ 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()); } -- 2.39.5