1 define([], function () {
4 angular.module('app.yangman').controller('LeafCtrl', LeafCtrl);
6 LeafCtrl.$inject = ['$scope'];
8 function LeafCtrl($scope){
17 'instance-identifier',
32 yangLeaf.infoBox = false;
33 yangLeaf.infoBoxSection = '';
36 yangLeaf.displayValue = displayValue;
37 yangLeaf.getLeafCentering = getLeafCentering;
38 yangLeaf.getLeafType = getLeafType;
39 yangLeaf.isActionMenu = isActionMenu;
42 function getLeafCentering(){
43 return ['union', 'bits', 'empty'].indexOf(getLeafType()) > -1 ? 'start' : 'center';
50 function getLeafType(){
51 var label = $scope.node.getChildren('type')[0].label;
52 return types.indexOf(label) !== -1 ? label : 'default';
55 function displayValue() {
56 return $scope.node.typeChild.label !== 'empty';
60 * Show hide action menu
61 * @returns {boolean|*}
63 function isActionMenu() {