mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 15:43:48 +00:00
[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:
@ -31,6 +31,11 @@
|
|||||||
"key": "LayoutController",
|
"key": "LayoutController",
|
||||||
"implementation": "LayoutController.js",
|
"implementation": "LayoutController.js",
|
||||||
"depends": [ "$scope" ]
|
"depends": [ "$scope" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "FixedController",
|
||||||
|
"implementation": "FixedController.js",
|
||||||
|
"depends": [ "$scope" ]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"types": [
|
"types": [
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
<div ng-repeat="childObject in composition"
|
<div ng-repeat="childObject in composition"
|
||||||
ng-style="controller.getStyle(childObject.getId())">
|
ng-style="controller.getStyle(childObject.getId())">
|
||||||
|
|
||||||
<div>
|
<div ng-style="controller.getCellStyle()">
|
||||||
<mct-representation key="'frame'"
|
{{childObject.getModel().name}}
|
||||||
mct-object="childObject">
|
</div>
|
||||||
</mct-representation>
|
<div ng-style="controller.getCellStyle()">
|
||||||
|
{{controller.getValue(childObject.getId())}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Drag handles -->
|
<!-- Drag handles -->
|
||||||
|
@ -5,8 +5,8 @@ define(
|
|||||||
function (LayoutDrag) {
|
function (LayoutDrag) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DEFAULT_DIMENSIONS = [ 12, 8 ],
|
var DEFAULT_DIMENSIONS = [ 2, 1 ],
|
||||||
DEFAULT_GRID_SIZE = [32, 32];
|
DEFAULT_GRID_SIZE = [64, 16];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FixedController is responsible for supporting the
|
* The FixedController is responsible for supporting the
|
||||||
@ -153,14 +153,14 @@ define(
|
|||||||
$scope.configuration || {};
|
$scope.configuration || {};
|
||||||
// Make sure there is a "panels" field in the
|
// Make sure there is a "panels" field in the
|
||||||
// view configuration.
|
// view configuration.
|
||||||
$scope.configuration.panels =
|
$scope.configuration.elements =
|
||||||
$scope.configuration.panels || {};
|
$scope.configuration.elements || {};
|
||||||
// Store the position of this panel.
|
// Store the position of this panel.
|
||||||
$scope.configuration.panels[activeDragId] =
|
$scope.configuration.elements[activeDragId] =
|
||||||
rawPositions[activeDragId];
|
rawPositions[activeDragId];
|
||||||
// Mark this object as dirty to encourage persistence
|
// Mark this object as dirty to encourage persistence
|
||||||
if ($scope.commit) {
|
if ($scope.commit) {
|
||||||
$scope.commit("Moved frame.");
|
$scope.commit("Moved element.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user