mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Fixed Controller] Stop tracking bounds
Stop tracking size of a fixed position view; no longer necessary now that background grid is handled by CSS. Change made in the context of WTD-1344.
This commit is contained in:
@ -20,14 +20,13 @@
|
|||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<div class="t-fixed-position l-fixed-position"
|
<div class="t-fixed-position l-fixed-position"
|
||||||
ng-controller="FixedController as controller"
|
ng-controller="FixedController as controller">
|
||||||
mct-resize="controller.setBounds(bounds)">
|
|
||||||
|
|
||||||
<!-- Background grid -->
|
<!-- Background grid -->
|
||||||
<div class="l-grid-holder" ng-click="controller.clearSelection()">
|
<div class="l-grid-holder" ng-click="controller.clearSelection()">
|
||||||
<div class="l-grid l-grid-x"
|
<div class="l-grid l-grid-x"
|
||||||
ng-style="{ 'background-size': controller.getGridSize() [0] + 'px 100%' }"></div>
|
ng-style="{ 'background-size': controller.getGridSize() [0] + 'px 100%' }"></div>
|
||||||
<div class="l-grid l-grid-y"
|
<div class="l-grid l-grid-y"
|
||||||
ng-style="{ 'background-size': '100% ' + controller.getGridSize() [1] + 'px' }"></div>
|
ng-style="{ 'background-size': '100% ' + controller.getGridSize() [1] + 'px' }"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -27,8 +27,7 @@ define(
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DEFAULT_DIMENSIONS = [ 2, 1 ],
|
var DEFAULT_DIMENSIONS = [ 2, 1 ],
|
||||||
DEFAULT_GRID_SIZE = [64, 16],
|
DEFAULT_GRID_SIZE = [64, 16];
|
||||||
DEFAULT_GRID_EXTENT = [4, 4];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FixedController is responsible for supporting the
|
* The FixedController is responsible for supporting the
|
||||||
@ -40,7 +39,6 @@ define(
|
|||||||
*/
|
*/
|
||||||
function FixedController($scope, $q, dialogService, telemetrySubscriber, telemetryFormatter) {
|
function FixedController($scope, $q, dialogService, telemetrySubscriber, telemetryFormatter) {
|
||||||
var gridSize = DEFAULT_GRID_SIZE,
|
var gridSize = DEFAULT_GRID_SIZE,
|
||||||
gridExtent = DEFAULT_GRID_EXTENT,
|
|
||||||
dragging,
|
dragging,
|
||||||
subscription,
|
subscription,
|
||||||
elementProxies = [],
|
elementProxies = [],
|
||||||
@ -284,18 +282,6 @@ define(
|
|||||||
getGridSize: function () {
|
getGridSize: function () {
|
||||||
return gridSize;
|
return gridSize;
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* Set the size of the viewable fixed position area.
|
|
||||||
* @memberof FixedController#
|
|
||||||
* @param bounds the width/height, as reported by mct-resize
|
|
||||||
*/
|
|
||||||
setBounds: function (bounds) {
|
|
||||||
var w = Math.ceil(bounds.width / gridSize[0]),
|
|
||||||
h = Math.ceil(bounds.height / gridSize[1]);
|
|
||||||
if (w !== gridExtent[0] || h !== gridExtent[1]) {
|
|
||||||
gridExtent = [w, h];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* Get an array of elements in this panel; these are
|
* Get an array of elements in this panel; these are
|
||||||
* decorated proxies for both selection and display.
|
* decorated proxies for both selection and display.
|
||||||
|
Reference in New Issue
Block a user