UNPKG

owl-bt

Version:

owl-bt is editor for Behavior trees. It has been inspired by Unreal engine behavior trees in a way, that it supports special node items like decorators and services. This makes trees smaller and much more readable.

32 lines (28 loc) 887 B
(function () { 'use strict'; angular.module('editorApp') .directive('treeItemDetails', function (TreeSelection) { return { template: require('./treeItemDetails.html'), restrict: 'E', replace: true, scope: {}, link: function (scope, element) { scope.TreeSelection = TreeSelection; scope.hasSelectedItem = () => { return TreeSelection.selItem(); }; scope.selIsDecorator = () => { return TreeSelection.selItemType() === 'decorator'; }; scope.selIsService = () => { return TreeSelection.selItemType() === 'service'; }; scope.isInvalidDesc = () => { const selItem = TreeSelection.selItem(); return selItem && selItem.$meta.desc.isInvalid; }; } }; }); })();