diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index 2fc798d891..88da08537a 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -30,8 +30,12 @@ define( function refreshCellStyles() { var x, y; + // Clear previous styles cellStyles = []; + // Update grid size from model + gridSize = ($scope.model || {}).layoutGrid || gridSize; + for (x = 0; x < gridExtent[0]; x += 1) { for (y = 0; y < gridExtent[1]; y += 1) { // Position blocks; subtract out border size from w/h diff --git a/platform/features/layout/test/FixedControllerSpec.js b/platform/features/layout/test/FixedControllerSpec.js index a4e67ac347..693c1c46d5 100644 --- a/platform/features/layout/test/FixedControllerSpec.js +++ b/platform/features/layout/test/FixedControllerSpec.js @@ -86,6 +86,7 @@ define( mockFormatter.formatRangeValue.andCallFake(function (v) { return "Formatted " + v; }); + mockScope.model = testModel; controller = new FixedController( mockScope,