mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Fixed Position] Fix grid size spec
Fix spec which ensures that FixedController correctly populates background grid based on user-defined grid size, after changes for WTD-879.
This commit is contained in:
@ -30,8 +30,12 @@ define(
|
|||||||
function refreshCellStyles() {
|
function refreshCellStyles() {
|
||||||
var x, y;
|
var x, y;
|
||||||
|
|
||||||
|
// Clear previous styles
|
||||||
cellStyles = [];
|
cellStyles = [];
|
||||||
|
|
||||||
|
// Update grid size from model
|
||||||
|
gridSize = ($scope.model || {}).layoutGrid || gridSize;
|
||||||
|
|
||||||
for (x = 0; x < gridExtent[0]; x += 1) {
|
for (x = 0; x < gridExtent[0]; x += 1) {
|
||||||
for (y = 0; y < gridExtent[1]; y += 1) {
|
for (y = 0; y < gridExtent[1]; y += 1) {
|
||||||
// Position blocks; subtract out border size from w/h
|
// Position blocks; subtract out border size from w/h
|
||||||
|
@ -86,6 +86,7 @@ define(
|
|||||||
mockFormatter.formatRangeValue.andCallFake(function (v) {
|
mockFormatter.formatRangeValue.andCallFake(function (v) {
|
||||||
return "Formatted " + v;
|
return "Formatted " + v;
|
||||||
});
|
});
|
||||||
|
mockScope.model = testModel;
|
||||||
|
|
||||||
controller = new FixedController(
|
controller = new FixedController(
|
||||||
mockScope,
|
mockScope,
|
||||||
|
Reference in New Issue
Block a user