From 5d2afac83b7ec094df7ffe7451cb55c1029c1eac Mon Sep 17 00:00:00 2001 From: Sarah Hale Date: Tue, 23 Jun 2015 15:40:12 -0700 Subject: [PATCH] [Events] Window injected with Angular Used provided by angular to better follow style guidelines, as well as for utility in testing later. #18. --- platform/features/events/bundle.json | 2 +- platform/features/events/src/directives/MCTDataTable.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/features/events/bundle.json b/platform/features/events/bundle.json index 39b34ee4eb..e925a1f215 100644 --- a/platform/features/events/bundle.json +++ b/platform/features/events/bundle.json @@ -24,7 +24,7 @@ { "key": "mctDataTable", "implementation": "directives/MCTDataTable.js", - "depends": [ "$anchorScroll" ] + "depends": [ "$window" ] } ] } diff --git a/platform/features/events/src/directives/MCTDataTable.js b/platform/features/events/src/directives/MCTDataTable.js index de3ea44e32..c0a3352d1d 100644 --- a/platform/features/events/src/directives/MCTDataTable.js +++ b/platform/features/events/src/directives/MCTDataTable.js @@ -19,7 +19,7 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ +/*global define,Promise,window*/ /** * Module defining MCTDataTable. Created by shale on 06/22/2015. @@ -29,7 +29,7 @@ define( function () { "use strict"; - function MCTDataTable($anchorScroll) { + function MCTDataTable($window) { return { restrict: "E", templateUrl: "platform/features/events/res/templates/mct-data-table.html", @@ -52,7 +52,7 @@ define( $scope.$watch("rows", function () { // Wait until the page as been repainted (otherwise the // height will always be zero) - window.requestAnimationFrame(function () { + $window.requestAnimationFrame(function () { previousHeight = currentHeight; // The height of the table body currentHeight = $element[0].firstElementChild.firstElementChild.nextElementSibling.clientHeight;