Skip to content

Commit

Permalink
Merge branch 'master' of github.com:GoogleChrome/chrome-app-samples
Browse files Browse the repository at this point in the history
  • Loading branch information
mangini committed Oct 1, 2013
2 parents ebc1823 + 9d5292e commit 119edc8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions window-state/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ function createNewWindow(optionsDictionary) {
var bounds = chrome.app.window.current().getBounds();
bounds.left = (bounds.left + newWindowOffset) % (screen.width - bounds.width);
bounds.top = (bounds.top + newWindowOffset) % (screen.height - bounds.height);
optionsDictionary.left = bounds.left;
optionsDictionary.top = bounds.top;
optionsDictionary.width = bounds.width;
optionsDictionary.height = bounds.height;
optionsDictionary.bounds = {};
optionsDictionary.bounds.left = bounds.left;
optionsDictionary.bounds.top = bounds.top;
optionsDictionary.bounds.width = bounds.width;
optionsDictionary.bounds.height = bounds.height;

chrome.app.window.create('window.html', optionsDictionary, callback);
};
Expand Down

0 comments on commit 119edc8

Please sign in to comment.