fix a resizing bug in the video editor demo

This commit is contained in:
rolux 2011-05-19 09:06:42 +02:00
commit 67c154547c
4 changed files with 36 additions and 16 deletions

View file

@ -5,7 +5,9 @@ Ox.load('UI', {
Ox.get('srt/0393109.srt', function(srt) {
var subtitles = Ox.parseSRT(srt);
var subtitles = Ox.parseSRT(srt, 25);
var $appPanel, $mainPanel;
var $videoEditor = Ox.VideoEditor({
annotationsSize: 256,
@ -32,11 +34,12 @@ Ox.load('UI', {
480: 'http://next.0xdb.org/0393109/96p.webm?480p'
},
videoHeight: 96,
videoSize: 'small',
videoWidth: 180,
width: window.innerWidth - 257
});
Ox.SplitPanel({
$appPanel = Ox.SplitPanel({
elements: [
{
collapsible: true,
@ -46,7 +49,7 @@ Ox.load('UI', {
size: 256
},
{
element: Ox.SplitPanel({
element: $mainPanel = Ox.SplitPanel({
elements: [
{
collapsible: true,
@ -61,28 +64,39 @@ Ox.load('UI', {
],
orientation: 'vertical'
})
.bindEvent({
resize: function(foo, size) {
$videoEditor.options({
width: size
});
}
})
}
],
orientation: 'horizontal'
})
.appendTo(Ox.UI.$body);
$videoEditor.$element.bindEvent({
Ox.UI.$window.bind({
resize: function() {
$videoEditor.options({
width: $appPanel.size(1),
height: $mainPanel.size(1)
});
}
});
$mainPanel.bindEvent({
resize: function(foo, size) {
Ox.print('HHHHHHHHH', foo, size)
$videoEditor.options({
width: size
});
}
});
$videoEditor.bindEvent({
resize: function(foo, size) {
Ox.print('RESIZE!!!!!!!!!')
$videoEditor.options({
height: size
});
}
});
});
});