[Fixed Position] Expose controller

Expose Fixed Position controller in order to begin implementing
Fixed Position view and editing behavior. WTD-615.
This commit is contained in:
Victor Woeltjen 2015-01-15 18:36:48 -08:00
parent 1b2ebf1250
commit d453e59308
3 changed files with 16 additions and 10 deletions

View File

@ -31,6 +31,11 @@
"key": "LayoutController",
"implementation": "LayoutController.js",
"depends": [ "$scope" ]
},
{
"key": "FixedController",
"implementation": "FixedController.js",
"depends": [ "$scope" ]
}
],
"types": [

View File

@ -4,10 +4,11 @@
<div ng-repeat="childObject in composition"
ng-style="controller.getStyle(childObject.getId())">
<div>
<mct-representation key="'frame'"
mct-object="childObject">
</mct-representation>
<div ng-style="controller.getCellStyle()">
{{childObject.getModel().name}}
</div>
<div ng-style="controller.getCellStyle()">
{{controller.getValue(childObject.getId())}}
</div>
<!-- Drag handles -->

View File

@ -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.");
}
}
};