diff --git a/angular-vertilize.js b/angular-vertilize.js index 6556218..5fbfa58 100644 --- a/angular-vertilize.js +++ b/angular-vertilize.js @@ -1,5 +1,5 @@ /*! - * angular-vertilize 1.0.1 + * angular-vertilize 1.0.2 * Christopher Collins * https://github.com/Sixthdim/angular-vertilize.git * License: MIT @@ -43,6 +43,11 @@ return height; }; + // reApply helper for child directives + _this.reApply = function(){ + return $scope.$apply(); + }; + // Add window resize to digest cycle angular.element($window).bind('resize', function(){ return $scope.$apply(); @@ -99,4 +104,17 @@ } ]); + // Vertilize resource + module.directive("vertilizeResource", [function() { + return { + restrict: "A", + require: "^vertilizeContainer", + link: function(scope, element, attrs, parent) { + element.bind('load', function() { + console.log('loaded'); + parent.reApply(); + }); + } + } + }]); }()); diff --git a/angular-vertilize.min.js b/angular-vertilize.min.js index a12b3e0..7903fb4 100644 --- a/angular-vertilize.min.js +++ b/angular-vertilize.min.js @@ -1,7 +1,7 @@ /*! - * angular-vertilize 1.0.1 + * angular-vertilize 1.0.2 * Christopher Collins * https://github.com/Sixthdim/angular-vertilize.git * License: MIT */ -!function(){"use strict";var a=angular.module("angular.vertilize",[]);a.directive("vertilizeContainer",[function(){return{restrict:"EA",controller:["$scope","$window",function(a,b){var c=this;c.childrenHeights=[],c.allocateMe=function(){return c.childrenHeights.push(0),c.childrenHeights.length-1},c.updateMyHeight=function(a,b){c.childrenHeights[a]=b},c.getTallestHeight=function(){for(var a=0,b=0;b