From d453e593086e73360e93e8dacf597e01c15de7ed Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 15 Jan 2015 18:36:48 -0800 Subject: [PATCH] [Fixed Position] Expose controller Expose Fixed Position controller in order to begin implementing Fixed Position view and editing behavior. WTD-615. --- platform/features/layout/bundle.json | 5 +++++ platform/features/layout/res/templates/fixed.html | 9 +++++---- platform/features/layout/src/FixedController.js | 12 ++++++------ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/platform/features/layout/bundle.json b/platform/features/layout/bundle.json index 80de35aacd..5d073da347 100644 --- a/platform/features/layout/bundle.json +++ b/platform/features/layout/bundle.json @@ -31,6 +31,11 @@ "key": "LayoutController", "implementation": "LayoutController.js", "depends": [ "$scope" ] + }, + { + "key": "FixedController", + "implementation": "FixedController.js", + "depends": [ "$scope" ] } ], "types": [ diff --git a/platform/features/layout/res/templates/fixed.html b/platform/features/layout/res/templates/fixed.html index af63b80b68..3f480c72e8 100644 --- a/platform/features/layout/res/templates/fixed.html +++ b/platform/features/layout/res/templates/fixed.html @@ -4,10 +4,11 @@
-
- - +
+ {{childObject.getModel().name}} +
+
+ {{controller.getValue(childObject.getId())}}
diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index 10c19eb3e7..ff43e6c4b0 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -5,8 +5,8 @@ define( function (LayoutDrag) { "use strict"; - var DEFAULT_DIMENSIONS = [ 12, 8 ], - DEFAULT_GRID_SIZE = [32, 32]; + var DEFAULT_DIMENSIONS = [ 2, 1 ], + DEFAULT_GRID_SIZE = [64, 16]; /** * The FixedController is responsible for supporting the @@ -153,14 +153,14 @@ define( $scope.configuration || {}; // Make sure there is a "panels" field in the // view configuration. - $scope.configuration.panels = - $scope.configuration.panels || {}; + $scope.configuration.elements = + $scope.configuration.elements || {}; // Store the position of this panel. - $scope.configuration.panels[activeDragId] = + $scope.configuration.elements[activeDragId] = rawPositions[activeDragId]; // Mark this object as dirty to encourage persistence if ($scope.commit) { - $scope.commit("Moved frame."); + $scope.commit("Moved element."); } } };