diff --git a/platform/commonUI/edit/src/representers/EditRepresenter.js b/platform/commonUI/edit/src/representers/EditRepresenter.js index a5d4af9b14..ffe7f24d11 100644 --- a/platform/commonUI/edit/src/representers/EditRepresenter.js +++ b/platform/commonUI/edit/src/representers/EditRepresenter.js @@ -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 () { diff --git a/platform/features/layout/bundle.js b/platform/features/layout/bundle.js index fa98fb94b2..21a0f8f263 100644 --- a/platform/features/layout/bundle.js +++ b/platform/features/layout/bundle.js @@ -71,9 +71,6 @@ define([ "uses": [ "composition" ], - "gestures": [ - "drop" - ], "toolbar": { "sections": [ { diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index b154f5f161..c8b5aebb2e 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -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({ diff --git a/platform/features/layout/src/LayoutController.js b/platform/features/layout/src/LayoutController.js index 496ee9d1a6..6d60738fc3 100644 --- a/platform/features/layout/src/LayoutController.js +++ b/platform/features/layout/src/LayoutController.js @@ -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