-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from diggyk/master
Minor UI fixes
- Loading branch information
Showing
7 changed files
with
100 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.3.1" | ||
__version__ = "0.3.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* directive for having a div's height based on the size of the viewport | ||
*/ | ||
(function() { | ||
angular.module('hermesApp').directive('viewportHeight', ['$window', '$timeout', | ||
function ($window, $timeout) { | ||
return { | ||
restrict: 'A', | ||
scope: { | ||
}, | ||
link: function ($scope, $ele, $attrs) { | ||
console.log("YAY!"); | ||
|
||
var renderTimeout; | ||
var minHeight = $attrs.minHeight || 200; | ||
var padding = $attrs.padding || 120; | ||
|
||
$ele.css('overflow', 'scroll'); | ||
|
||
angular.element($window).bind('resize', function() { | ||
fixHeight(); | ||
}); | ||
|
||
function fixHeight() { | ||
var innerHeight = $window.innerHeight; | ||
console.log($window); | ||
|
||
var height = minHeight; | ||
if (innerHeight > minHeight) { | ||
height = innerHeight - padding - 80; | ||
} | ||
|
||
$ele.css('height', height + 'px'); | ||
} | ||
|
||
fixHeight(); | ||
} | ||
} | ||
}]); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters