Skip to content

Commit

Permalink
Adjusted map layout to work within frames
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Stanley committed Mar 7, 2015
1 parent 3223327 commit 26b53a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions html/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ angular.module("mapApp", ["ui.bootstrap", "ui.utils", "nagiosDecorations",
$location.absUrl().replace(/map\.html.*$/, "images/logos/"),
};

$scope.svgWidth = $window.innerWidth - 1;
$scope.svgHeight = $window.innerHeight - 3;
var rightPadding = 1;
var bottomPadding = 4;

$scope.svgWidth = $window.innerWidth - rightPadding;
$scope.svgHeight = $window.innerHeight - bottomPadding;

// Application state variables
$scope.formDisplayed = false;
Expand Down Expand Up @@ -162,8 +165,8 @@ angular.module("mapApp", ["ui.bootstrap", "ui.utils", "nagiosDecorations",
};

angular.element($window).bind("resize", function() {
$scope.svgWidth = $window.innerWidth - 1;
$scope.svgHeight = $window.innerHeight - 3;
$scope.svgWidth = $window.innerWidth - rightPadding;
$scope.svgHeight = $window.innerHeight - bottomPadding;
$scope.$apply("svgWidth");
$scope.$apply("svgHeight");
});
Expand Down
5 changes: 5 additions & 0 deletions html/stylesheets/map.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* Styles for the body as whole */
body {
margin: 0;
}

/* Styles for the map header div */
div#header-container {
position: absolute;
Expand Down

0 comments on commit 26b53a8

Please sign in to comment.