improvements to editor (make video size sticky, make up/down work correctly if scrollbar is visible)

This commit is contained in:
rolux 2011-01-18 18:52:45 +00:00
parent a109f67db5
commit 356d850f34
2 changed files with 17 additions and 11 deletions

View file

@ -186,7 +186,8 @@
"sitePage": "home",
"theme": "modern",
"videoPosition": {},
"videoSize": "fit"
"videoScreen": "fit",
"videoSize": "small"
},
"username": ""
}

View file

@ -989,13 +989,15 @@ var pandora = new Ox.App({
videoHeight: video.height,
videoId: app.user.ui.item,
videoWidth: video.width,
videoSize: app.user.ui.videoSize,
videoSize: app.user.ui.videoScreen,
videoURL: video.url,
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1
}).bindEvent({
change: function(event, data) {
// showAnnotations, showControls, videoSize
UI.set(data);
// showAnnotations, showControls, videoScreen
UI.set('videoSize' in data ? {
videoScreen: data.videoSize
} : data);
},
enterfullscreen: enterFullscreen,
exitfullscreen: exitFullscreen
@ -1035,16 +1037,19 @@ var pandora = new Ox.App({
videoHeight: video.height,
videoId: app.user.ui.item,
videoWidth: video.width,
videoSize: 'small',
videoSize: app.user.ui.videoSize,
videoURL: video.url,
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1 -
(app.user.ui.showAnnotations * app.user.ui.annotationsSize) - 1
}).bindEvent('resize', function(event, data) {
//Ox.print('resize editor', data)
}).bindEvent({
resize: function(event, data) {
app.$ui.editor.options({
width: data
});
//Ox.print('resize done')
},
togglesize: function(event, data) {
UI.set({videoSize: data.size});
}
}));
that.replace(1, app.$ui.annotations = ui.annotations());
that.bindEvent('resize', function(event, data) {