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