Fixes inspector live view functionality.

This commit is contained in:
Yury Delendik 2015-05-11 08:46:25 -05:00
Родитель a941054501
Коммит bb93b49bd7
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -1,9 +1,13 @@
document.getElementById("viewDisplayList").addEventListener("click", function () { document.getElementById("viewDisplayList").addEventListener("click", function () {
if (!gfxWindow) {
return;
}
var currentEasel = gfxWindow.easel;
var displayList = document.getElementById("displayList"); var displayList = document.getElementById("displayList");
if (displayList.children.length === 0) { 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 () { currentEasel.addEventListener("render", function () {
displayListTreeView.render(); displayListTreeView.render();
}); });
} }
}); });