mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 08:39:59 +00:00
[Edit Mode] #627 slightly modified edit representer to detect newly created objects
Added some comments, renamed controller variable in markup Removed edit references from BrowseController
This commit is contained in:
@ -22,11 +22,8 @@
|
||||
/*global define,Promise*/
|
||||
|
||||
define(
|
||||
[
|
||||
'../../../representation/src/gestures/GestureConstants',
|
||||
'../../edit/src/objects/EditableDomainObject'
|
||||
],
|
||||
function (GestureConstants, EditableDomainObject) {
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
@ -57,10 +54,9 @@ define(
|
||||
|
||||
function updateQueryParam(viewKey) {
|
||||
var unlisten,
|
||||
priorRoute = $route.current,
|
||||
isEditMode = $scope.domainObject && $scope.domainObject.hasCapability('editor');
|
||||
priorRoute = $route.current;
|
||||
|
||||
if (viewKey && !isEditMode) {
|
||||
if (viewKey) {
|
||||
$location.search('view', viewKey);
|
||||
unlisten = $scope.$on('$locationChangeSuccess', function () {
|
||||
// Checks path to make sure /browse/ is at front
|
||||
@ -76,10 +72,6 @@ define(
|
||||
$scope.$watch('domainObject', setViewForDomainObject);
|
||||
$scope.$watch('representation.selected.key', updateQueryParam);
|
||||
|
||||
$scope.cancelEditing = function() {
|
||||
navigationService.setNavigation($scope.domainObject.getDomainObject());
|
||||
};
|
||||
|
||||
$scope.doAction = function (action){
|
||||
return $scope[action] && $scope[action]();
|
||||
};
|
||||
|
Reference in New Issue
Block a user