summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/me2mom/remoting.js11
-rw-r--r--remoting/webapp/me2mom/toolbar.css2
2 files changed, 10 insertions, 3 deletions
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index 6e64d30..9e4f9b8 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -465,8 +465,9 @@ function onClientStateChange_(oldState) {
} else if (state == remoting.ClientSession.State.INITIALIZING) {
remoting.debug.log('Initializing connection');
} else if (state == remoting.ClientSession.State.CONNECTED) {
- showToolbarPreview_();
remoting.setMode(remoting.AppMode.IN_SESSION);
+ recenterToolbar_();
+ showToolbarPreview_();
updateStatistics();
var accessCode = document.getElementById('access-code-entry');
accessCode.value = '';
@@ -674,6 +675,7 @@ remoting.toggleScaleToFit = function(button) {
remoting.onResize = function() {
if (remoting.session)
remoting.session.onWindowSizeChanged();
+ recenterToolbar_();
}
/**
@@ -724,4 +726,11 @@ remoting.setUseP2pApi = function(use) {
}
}
+function recenterToolbar_() {
+ var toolbar = document.getElementById('session-toolbar');
+ var toolbarX = (window.innerWidth - toolbar.clientWidth) / 2;
+ toolbar.style['left'] = toolbarX + 'px';
+ remoting.debug.log('toolbar moved to ' + toolbarX);
+}
+
}());
diff --git a/remoting/webapp/me2mom/toolbar.css b/remoting/webapp/me2mom/toolbar.css
index 0b67cbf..a89b243 100644
--- a/remoting/webapp/me2mom/toolbar.css
+++ b/remoting/webapp/me2mom/toolbar.css
@@ -7,8 +7,6 @@
position: fixed;
top: -45px;
width: 640px;
- left: 50%;
- margin-left: -320px;
-webkit-transition: top 0.2s linear;
-webkit-transition-delay: 0.7s;
font-size: 13px;