angular-fluidbox
Version:
Angular directive wrapping fluidbox
1 lines • 478 B
JavaScript
angular.module("fluidbox",[]).directive("fluidbox",function(){return{restrict:"A",link:function(e,t,i){var o={immediateOpen:i.immediateOpen||!1,loader:i.loader||!1,maxWidth:i.maxWidth||0,maxHeight:i.maxHeight||0,resizeThrottle:i.resizeThrottle||500,stackIndex:i.stackIndex||1e3,stackIndexDelta:i.stackIndexDelta||10,viewportFill:i.viewportFill||.95};i.ngHref?i.$observe("href",function(e){e&&t.fluidbox(o)}):t.fluidbox(o),e.$on("$destroy",function(){t.fluidbox("destroy")})}}});