Automatically resizing to fit

This commit is contained in:
Will Marshall
2014-06-05 16:49:01 +10:00
parent 5ffb8decf5
commit b1b80a1e39
4 changed files with 19 additions and 7 deletions

View File

@@ -6,4 +6,3 @@ Darkswarm.controller "MapCtrl", ($scope, MapConfiguration, OfnMap)->
longitude: 144.743663
zoom: 8
styles: MapConfiguration.options

View File

@@ -0,0 +1,10 @@
Darkswarm.directive "fillVertical", ($window)->
restrict: 'A'
link: (scope, element, attrs)->
setSize = ->
element.css "height", ($window.innerHeight - element.offset().top)
setSize()
angular.element($window).bind "resize", ->
setSize()