From 627e03762edf18d4a0b6993ef4512a7178e6052b Mon Sep 17 00:00:00 2001 From: Bryan McBride Date: Tue, 17 Feb 2015 11:02:50 -0500 Subject: [PATCH] Zoom to extent when opening GitHub & Gist files --- dist/site.js | 2 ++ dist/site.mobile.js | 2 ++ src/ui/file_bar.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/dist/site.js b/dist/site.js index 71a0c02a0..a95857b26 100644 --- a/dist/site.js +++ b/dist/site.js @@ -26268,6 +26268,7 @@ module.exports = function fileBar(context) { '/git/blobs/' + last.sha, function(err, blob) { d.content = JSON.parse(atob(blob[0].content)); context.data.parse(d); + zoomextent(context); m.close(); }); } @@ -26350,6 +26351,7 @@ module.exports = function fileBar(context) { .open() .onclick(function(d) { context.data.parse(d); + zoomextent(context); m.close(); }) .appendTo( diff --git a/dist/site.mobile.js b/dist/site.mobile.js index fdb744dd9..35161c852 100644 --- a/dist/site.mobile.js +++ b/dist/site.mobile.js @@ -26188,6 +26188,7 @@ module.exports = function fileBar(context) { '/git/blobs/' + last.sha, function(err, blob) { d.content = JSON.parse(atob(blob[0].content)); context.data.parse(d); + zoomextent(context); m.close(); }); } @@ -26270,6 +26271,7 @@ module.exports = function fileBar(context) { .open() .onclick(function(d) { context.data.parse(d); + zoomextent(context); m.close(); }) .appendTo( diff --git a/src/ui/file_bar.js b/src/ui/file_bar.js index 7ec741e75..181b03f45 100644 --- a/src/ui/file_bar.js +++ b/src/ui/file_bar.js @@ -268,6 +268,7 @@ module.exports = function fileBar(context) { '/git/blobs/' + last.sha, function(err, blob) { d.content = JSON.parse(atob(blob[0].content)); context.data.parse(d); + zoomextent(context); m.close(); }); } @@ -350,6 +351,7 @@ module.exports = function fileBar(context) { .open() .onclick(function(d) { context.data.parse(d); + zoomextent(context); m.close(); }) .appendTo(