Skip to content

Commit 44e50d9

Browse files
committed
only expand when clicking triangle
1 parent b87a95f commit 44e50d9

File tree

7 files changed

+45
-32
lines changed

7 files changed

+45
-32
lines changed

build/phaser-inspector.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59207,14 +59207,15 @@ var DisplayObject = (function () {
5920759207
* Or the current text (if it's the Text object)
5920859208
* Or the specified name (if any, probably not, sadly)
5920959209
*/
59210+
}, {
59211+
key: 'expand',
59212+
value: function expand() {
59213+
this.expanded = !this.expanded;
59214+
this.gameManager.$inspectorTreeSelected = this.obj;
59215+
}
5921059216
}, {
5921159217
key: 'select',
5921259218
value: function select() {
59213-
/**
59214-
* If an object is selected,
59215-
* it should also toggle the expansion
59216-
*/
59217-
this.expanded = !this.expanded;
5921859219
this.gameManager.$inspectorTreeSelected = this.obj;
5921959220
}
5922059221
}, {
@@ -60092,12 +60093,12 @@ module.exports = exports['default'];
6009260093
module.exports = "<div class=\"phaser-inspector-panel\" ng-init=\"display={}\" ng-class=\"{collapsed: display.hide}\">\n\t<div class=\"grabber\">\n\t\t<div class=\"close\" ng-click=\"display.hide = !display.hide\">\n\t\t\t<i class=\"fa\" ng-class=\"{'fa-bars': display.hide, 'fa-times-circle':!display.hide}\"></i>\n\t\t</div>\n\t</div>\n\n\t<div id=\"tree\" phaser-inspector-tree class=\"panel\" ng-if=\"!display.hide\"></div>\n\n\t<div id=\"details\" phaser-inspector-details class=\"panel\" ng-if=\"!display.hide\"></div>\n</div>\n<div class=\"tooltip\" pg-ng-tooltip></div>";
6009360094

6009460095
},{}],34:[function(require,module,exports){
60095-
module.exports = "<div id=\"header\" ng-if=\"!detailCtrl.isWorld\">\n <div class=\"button danger\"\n ng-click=\"detailCtrl.destroy()\"\n >\n Destroy\n </div>\n <div class=\"button\"\n ng-class=\"{warn: cache.alive, success: !cache.alive}\"\n ng-click=\"detailCtrl.killRevive()\"\n ng-if=\"cache.kill\"\n >\n {{ cache.alive ? 'Kill' : 'Revive' }}\n </div>\n <div class=\"button\"\n ng-class=\"{info : cache.visible, deactive : !cache.visible}\"\n ng-click=\"detailCtrl.showHide()\"\n ng-if=\"cache.alive || !cache.kill\"\n >\n <i class=\"fa\"\n ng-class=\"{'fa-eye': cache.visible, 'fa-eye-slash': !cache.visible}\"\n ></i>\n </div>\n <div class=\"button primary\"\n ng-click=\"detailCtrl.deselect()\"\n >\n <i class=\"fa fa-ban\"></i>\n </div>\n</div>\n<div class=\"info\">\n <div class=\"row\">\n <div class=\"label pl1\">Class</div>\n <div class=\"detail\" ng-bind=\"cache.className\"></div>\n </div>\n <div class=\"row\">\n <div class=\"label pl1\">Children</div>\n <div class=\"detail\" ng-bind=\"cache.noChildren\"></div>\n </div>\n <div class=\"row\">\n <div class=\"label pl1\">Alive</div>\n <div class=\"detail\" ng-bind=\"cache.noAlive\"></div>\n </div>\n <div class=\"row\">\n <div class=\"label pl1\">Nested</div>\n <div class=\"detail\" ng-bind=\"cache.noNested\"></div>\n </div>\n <div class=\"row\">\n <div class=\"label pl1\">Nested alive</div>\n <div class=\"detail\" ng-bind=\"cache.noNestedAlive\"></div>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Position</div>\n <div class=\"row\">\n <div class=\"label pl2\">x</div>\n <input class=\"detail f8 pl2\" type=\"number\" ng-model=\"cache.position.x\"/>\n <div class=\"label pl2\">y</div>\n <input class=\"detail f8 pl2\" type=\"number\" ng-model=\"cache.position.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">World Position</div>\n <div class=\"row\">\n <div class=\"label pl2\">x</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.world.x\"/>\n <div class=\"label pl2\">y</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.world.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Size</div>\n <div class=\"row\">\n <div class=\"label f4 pl2\">width</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.size.x\"/>\n <div class=\"label f5 pl2\">height</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.size.y\"/>\n </div>\n</div>\n<div class=\"section\" ng-if=\"cache.hasTargetSize\">\n <div class=\"row header\">Target size</div>\n <div class=\"row\">\n <div class=\"label f4 pl2\">width</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.targetSize.x\"/>\n <div class=\"label f5 pl2\">height</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.targetSize.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Bounds</div>\n <div class=\"row\">\n <div class=\"label f4 pl2\">width</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.bounds.x\"/>\n <div class=\"label f5 pl2\">height</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.bounds.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Scale</div>\n <div class=\"row\">\n <div class=\"label pl2\">x</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.scale.x\"/>\n <div class=\"label pl2\">y</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.scale.y\"/>\n </div>\n</div>\n\n<div class=\"section\" ng-if=\"cache.img.url\">\n <div class=\"row header\">Frame</div>\n <div class=\"frame-img\" ng-style=\"{\n background :'url('+cache.img.url+')',\n width : cache.img.width+'px',\n height : cache.img.height+'px',\n 'background-position' : (-cache.img.x) + 'px ' + (-cache.img.y) + 'px',\n transform : 'scale(' + cache.img.scale + ')'\n }\"></div>\n</div>";
60096+
module.exports = "<div id=\"header\" ng-if=\"!detailCtrl.isWorld\">\n <div class=\"button danger\"\n ng-click=\"detailCtrl.destroy()\"\n >\n Destroy\n </div>\n <div class=\"button\"\n ng-class=\"{warn: cache.alive, success: !cache.alive}\"\n ng-click=\"detailCtrl.killRevive()\"\n ng-if=\"cache.kill\"\n >\n {{ cache.alive ? 'Kill' : 'Revive' }}\n </div>\n <div class=\"button\"\n ng-class=\"{info : cache.visible, deactive : !cache.visible}\"\n ng-click=\"detailCtrl.showHide()\"\n ng-if=\"cache.alive || !cache.kill\"\n tooltip-trigger tooltip-text=\"Show/Hide\"\n >\n <i class=\"fa\"\n ng-class=\"{'fa-eye': cache.visible, 'fa-eye-slash': !cache.visible}\"\n ></i>\n </div>\n <div class=\"button primary\"\n ng-click=\"detailCtrl.deselect()\"\n tooltip-trigger tooltip-text=\"Deselect\"\n >\n <i class=\"fa fa-ban\"></i>\n </div>\n</div>\n<div class=\"info\">\n <div class=\"row\">\n <div class=\"label pl1\">Class</div>\n <div class=\"detail\" ng-bind=\"cache.className\"></div>\n </div>\n <div class=\"row\"\n tooltip-trigger tooltip-text=\"Number of direct children\"\n >\n <div class=\"label pl1\">Children</div>\n <div class=\"detail\" ng-bind=\"cache.noChildren\"></div>\n </div>\n <div class=\"row\"\n tooltip-trigger tooltip-text=\"Number of alive direct children\"\n >\n <div class=\"label pl1\">Alive</div>\n <div class=\"detail\" ng-bind=\"cache.noAlive\"></div>\n </div>\n <div class=\"row\"\n tooltip-trigger tooltip-text=\"Number of nested children\"\n >\n <div class=\"label pl1\">Nested</div>\n <div class=\"detail\" ng-bind=\"cache.noNested\"></div>\n </div>\n <div class=\"row\"\n tooltip-trigger tooltip-text=\"Number of alive nested children, not sure if it is correct yet\"\n >\n <div class=\"label pl1\">Nested alive</div>\n <div class=\"detail\" ng-bind=\"cache.noNestedAlive\"></div>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Position</div>\n <div class=\"row\">\n <div class=\"label pl2\">x</div>\n <input class=\"detail f8 pl2\" type=\"number\" ng-model=\"cache.position.x\"/>\n <div class=\"label pl2\">y</div>\n <input class=\"detail f8 pl2\" type=\"number\" ng-model=\"cache.position.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">World Position</div>\n <div class=\"row\">\n <div class=\"label pl2\">x</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.world.x\"/>\n <div class=\"label pl2\">y</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.world.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Size</div>\n <div class=\"row\">\n <div class=\"label f4 pl2\">width</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.size.x\"/>\n <div class=\"label f5 pl2\">height</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.size.y\"/>\n </div>\n</div>\n<div class=\"section\" ng-if=\"cache.hasTargetSize\">\n <div class=\"row header\">Target size</div>\n <div class=\"row\">\n <div class=\"label f4 pl2\">width</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.targetSize.x\"/>\n <div class=\"label f5 pl2\">height</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.targetSize.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Bounds</div>\n <div class=\"row\">\n <div class=\"label f4 pl2\">width</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.bounds.x\"/>\n <div class=\"label f5 pl2\">height</div>\n <input class=\"detail f5\" type=\"number\" ng-model=\"cache.bounds.y\"/>\n </div>\n</div>\n<div class=\"section\">\n <div class=\"row header\">Scale</div>\n <div class=\"row\">\n <div class=\"label pl2\">x</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.scale.x\"/>\n <div class=\"label pl2\">y</div>\n <input class=\"detail f8\" type=\"number\" ng-model=\"cache.scale.y\"/>\n </div>\n</div>\n\n<div class=\"section\" ng-if=\"cache.img.url\">\n <div class=\"row header\">Frame</div>\n <div class=\"frame-img\" ng-style=\"{\n background :'url('+cache.img.url+')',\n width : cache.img.width+'px',\n height : cache.img.height+'px',\n 'background-position' : (-cache.img.x) + 'px ' + (-cache.img.y) + 'px',\n transform : 'scale(' + cache.img.scale + ')'\n }\"></div>\n</div>";
6009660097

6009760098
},{}],35:[function(require,module,exports){
6009860099
module.exports = "<div class=\"states\">\n\t<div>\n\t\t<div class=\"state\" ng-repeat=\"(state, stateObj) in treeCtrl.game.state.states\" ng-bind=\"state\" ng-class=\"{selected : state === treeCtrl.game.state.current}\" ng-click=\"treeCtrl.goToState(state)\">\n\t\t</div>\n\t</div>\n</div>\n\n<div class=\"tree-control\">\n <div class=\"button info\"\n tooltip-trigger tooltip-text=\"Collapse All\"\n ng-click=\"treeCtrl.gameManager.collapseAll()\"\n >\n <i class=\"fa fa-compress\"></i>\n </div>\n <div class=\"button\"\n ng-class=\"{\n warn : treeCtrl.gameManager.$render,\n deactive : !treeCtrl.gameManager.$render\n }\"\n tooltip-trigger tooltip-text=\"Toggle Box Render\"\n ng-click=\"treeCtrl.gameManager.$render = !treeCtrl.gameManager.$render\"\n >\n <i class=\"fa fa-paint-brush\"></i>\n </div>\n <div class=\"button\"\n ng-class=\"{\n\t\tsuccess : treeCtrl.game.paused,\n\t\tdanger : !treeCtrl.game.paused\n }\"\n tooltip-trigger tooltip-text=\"Play/Pause\"\n ng-click=\"treeCtrl.game.paused = !treeCtrl.game.paused\"\n >\n <i class=\"fa\" ng-class=\"{\n 'fa-play' : treeCtrl.game.paused,\n 'fa-pause' : !treeCtrl.game.paused\n }\"></i>\n </div>\n</div>\n\n<div class=\"scene\">\n\t<view-collection ng-if=\"!treeCtrl.search || treeCtrl.search.length === 0 || !treeCtrl.search.trim()\" parent=\"treeCtrl.game.world.children\" filtered=\"false\"></view-collection>\n\t<view-collection ng-if=\"treeCtrl.search && treeCtrl.search.length && treeCtrl.search.trim()\" parent=\"treeCtrl.gameManager.filteredWorld.$inspectorFilteredChildren\" filtered=\"true\"></view-collection>\n</div>\n<input class=\"search\" type=\"text\" ng-model=\"treeCtrl.search\" placeholder=\"Search Display Object\">";
6009960100

6010060101
},{}],36:[function(require,module,exports){
60101-
module.exports = "<div bindonce class=\"view\" ng-class=\"{weak : !obj.alive}\">\n\t<div class=\"row\" ng-class=\"{selected : viewCtrl.selected, parentSelected : viewCtrl.parentSelected}\">\n\t\t<div class=\"middle\" bo-style=\"{'padding-left' : (viewCtrl.childLevel * 20) + 'px'}\">\n\t\t\t<div class=\"eye\" ng-click=\"viewCtrl.toggle(); obj.visible = !obj.visible\">\n\t\t\t\t<i class=\"fa\" ng-class=\"{'fa-eye' : obj.visible, 'fa-eye-slash' : !obj.visible}\"></i>\n\t\t\t</div>\n\t\t\t<div ng-click=\"viewCtrl.select()\">\n\t\t\t\t<div class=\"toggle\">\n\t\t\t\t\t<i class=\"fa fa-circle\" ng-if=\"!viewCtrl.hasChildren\"></i>\n\t\t\t\t\t<i class=\"fa\" ng-if=\"viewCtrl.hasChildren\" ng-class=\"{'fa-caret-down' : viewCtrl.expanded, 'fa-caret-right' : !viewCtrl.expanded}\"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"name\" bo-bind=\"viewCtrl.name\"></div>\n\t\t\t\t<div class=\"type\" bo-bind=\"viewCtrl.type\"></div>\n\t\t\t\t<div class=\"children\" ng-bind=\"viewCtrl.numberOfChildren\"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>";
60102+
module.exports = "<div bindonce class=\"view\" ng-class=\"{weak : !obj.alive}\">\n\t<div class=\"row\" ng-class=\"{selected : viewCtrl.selected, parentSelected : viewCtrl.parentSelected}\">\n\t\t<div class=\"middle\" bo-style=\"{'padding-left' : (viewCtrl.childLevel * 20) + 'px'}\">\n\t\t\t<div class=\"eye\" ng-click=\"viewCtrl.toggle(); obj.visible = !obj.visible\">\n\t\t\t\t<i class=\"fa\" ng-class=\"{'fa-eye' : obj.visible, 'fa-eye-slash' : !obj.visible}\"></i>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div class=\"toggle\" ng-click=\"viewCtrl.expand()\">\n\t\t\t\t\t<i class=\"fa fa-circle\" ng-if=\"!viewCtrl.hasChildren\"></i>\n\t\t\t\t\t<i class=\"fa\" ng-if=\"viewCtrl.hasChildren\" ng-class=\"{'fa-caret-down' : viewCtrl.expanded, 'fa-caret-right' : !viewCtrl.expanded}\"></i>\n\t\t\t\t</div>\n\t\t\t\t<div ng-click=\"viewCtrl.select()\">\n\t\t\t\t\t<div class=\"name\" bo-bind=\"viewCtrl.name\"></div>\n\t\t\t\t\t<div class=\"type\" bo-bind=\"viewCtrl.type\"></div>\n\t\t\t\t\t<div class=\"children\" ng-bind=\"viewCtrl.numberOfChildren\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>";
6010260103

6010360104
},{}]},{},[20]);

build/phaser-inspector.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)