'use strict';angular.module('twoBookApp').directive('chartWrapper',['$timeout','$window',function($timeout,$window){return{scope:{},controllerAs:'wrapper',transclude:true,restrict:'E',controller:['$scope','$element','$transclude',function($scope,$element,$transclude){var wrapper=this;wrapper.resize=0;wrapper.height=400;$transclude($scope,function(transEl){$element.append(transEl);});}],link:function(scope,element,ctrl,transclude){angular.element($window).bind('resize',function(){scope.wrapper.resize=!scope.wrapper.resize;scope.$digest();});}};}]);angular.module('twoBookApp').directive('tboResize',['$timeout',function($timeout){return{link:function(scope,el){scope.$watch(function(){return $(el).attr('tbo-resize');},function(value){$timeout(function(){var chartWidget=$(el).find("div[kendo-chart]").data("kendoChart");if(chartWidget!==undefined){chartWidget.resize();}});});}};}]);angular.module('twoBookApp').directive('tboChartHeight',['$timeout',function($timeout){return{scope:{height:'=tboChartHeight'},link:function(scope,element){scope.$watch('height',function(value){var chartWidget=$(element).data("kendoChart");chartWidget.wrapper.height(value);chartWidget.resize();})}};}]);