mirror of
https://github.com/nasa/openmct.git
synced 2025-04-18 16:17:48 +00:00
[New Edit Mode] #633 Removed Editing workflow concerns from FixedController, LayoutController
This commit is contained in:
parent
25a2321578
commit
b6502e9ea1
@ -91,14 +91,8 @@ define(
|
||||
}
|
||||
}
|
||||
|
||||
function setEditable(editableDomainObject) {
|
||||
self.domainObject = editableDomainObject;
|
||||
scope.model = editableDomainObject.getModel();
|
||||
}
|
||||
|
||||
// Place the "commit" method in the scope
|
||||
scope.commit = commit;
|
||||
scope.setEditable = setEditable;
|
||||
|
||||
// Clean up when the scope is destroyed
|
||||
scope.$on("$destroy", function () {
|
||||
|
@ -71,9 +71,6 @@ define([
|
||||
"uses": [
|
||||
"composition"
|
||||
],
|
||||
"gestures": [
|
||||
"drop"
|
||||
],
|
||||
"toolbar": {
|
||||
"sections": [
|
||||
{
|
||||
|
@ -271,15 +271,13 @@ define(
|
||||
}
|
||||
|
||||
// Position a panel after a drop event
|
||||
function handleDrop(e, id, position, editableDomainObject) {
|
||||
function handleDrop(e, id, position) {
|
||||
// Don't handle this event if it has already been handled
|
||||
// color is set to "" to let the CSS theme determine the default color
|
||||
if (e.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
if (editableDomainObject) {
|
||||
$scope.setEditable(editableDomainObject);
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
// Store the position of this element.
|
||||
addElement({
|
||||
|
@ -60,15 +60,11 @@ define(
|
||||
}
|
||||
|
||||
// Position a panel after a drop event
|
||||
//An editableDomainObject is provided, as the drop may have
|
||||
// triggered a transition to edit mode.
|
||||
function handleDrop(e, id, position, editableDomainObject) {
|
||||
function handleDrop(e, id, position) {
|
||||
if (e.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
if (editableDomainObject) {
|
||||
$scope.setEditable(editableDomainObject);
|
||||
}
|
||||
|
||||
// Ensure that configuration field is populated
|
||||
$scope.configuration = $scope.configuration || {};
|
||||
// Make sure there is a "panels" field in the
|
||||
|
Loading…
x
Reference in New Issue
Block a user