From 550e89daef3428d6ff315bc06318664fc44a8c2d Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Wed, 8 Oct 2014 03:47:45 -0400 Subject: [PATCH] progress --- script/phantomjs-save-screenshot.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/script/phantomjs-save-screenshot.js b/script/phantomjs-save-screenshot.js index d6d615dc..a8bfdf04 100755 --- a/script/phantomjs-save-screenshot.js +++ b/script/phantomjs-save-screenshot.js @@ -36,14 +36,18 @@ page.open(url, function (status) { }; page.evaluate(function() { - $(document).on(Metamaps.JIT.events.animationDone, function(){ - $('.upperLeftUI, .upperRightUI, .mapControls, .infoAndHelp, .uv-icon, .footer').hide(); - Metamaps.JIT.zoomExtents(); - if (typeof window.callPhantom === 'function') { - window.callPhantom(); - } - });//document.on animationDone + + $(document).ready(function () { + //$(document).on(Metamaps.JIT.events.animationDone, function() { + setTimeout(function(){ + $('.upperLeftUI, .upperRightUI, .mapControls, .infoAndHelp, .uv-icon, .footer').hide(); + Metamaps.JIT.zoomExtents(); + window.callPhantom(); + }, 5000); + }); + });//page.evaluate + } else { //failed to load phantom.exit();