From bb93b49bd76f32e1d5a4041c9bcdfc4d1e1a4551 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 11 May 2015 08:46:25 -0500 Subject: [PATCH] Fixes inspector live view functionality. --- examples/inspector/js/inspectorDisplayList.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/inspector/js/inspectorDisplayList.js b/examples/inspector/js/inspectorDisplayList.js index 7365a6107..75d93051a 100644 --- a/examples/inspector/js/inspectorDisplayList.js +++ b/examples/inspector/js/inspectorDisplayList.js @@ -1,9 +1,13 @@ document.getElementById("viewDisplayList").addEventListener("click", function () { + if (!gfxWindow) { + return; + } + var currentEasel = gfxWindow.easel; var displayList = document.getElementById("displayList"); if (displayList.children.length === 0) { - var displayListTreeView = new Shumway.GFX.TreeRenderer(displayList, currentEasel.stage); + var displayListTreeView = new gfxWindow.Shumway.GFX.TreeRenderer(displayList, currentEasel.stage); currentEasel.addEventListener("render", function () { displayListTreeView.render(); }); } -}); \ No newline at end of file +});