Object has no children fix (#2038)

* Added files for PR 1904

* Added new lines

* space fix

* Implemented changes

* Space fix

* checkstyle fix

Fixes #1826
This commit is contained in:
Aayush Arora (angularboy)
2018-06-30 00:27:45 +05:30
committed by Pete Richards
parent b8f278cabf
commit eaa9514453
5 changed files with 24 additions and 19 deletions

View File

@ -24,7 +24,7 @@ define([
'angular',
'../ui/TreeView'
], function (angular, TreeView) {
function MCTTree(gestureService) {
function MCTTree(gestureService, openmct) {
function link(scope, element) {
if (!scope.allowSelection) {
scope.allowSelection = function () {
@ -34,8 +34,9 @@ define([
if (!scope.onSelection) {
scope.onSelection = function () {};
}
var currentSelection = scope.selectedObject;
var treeView = new TreeView(gestureService);
var treeView = new TreeView(gestureService, openmct);
function setSelection(domainObject, event) {
if (currentSelection === domainObject) {