1
0
Fork 0
forked from 0x2620/oxjs

some support for resizing

This commit is contained in:
rolux 2011-05-28 01:49:36 +02:00
commit d915e9f205
3 changed files with 61 additions and 24 deletions

View file

@ -11,7 +11,7 @@ Ox.load('UI', {debug: true, hideScreen: true, showScreen: true, theme: 'modern'}
//Ox.print('$$$$', Ox.Calendar)
Ox.Calendar({
var $calendar = Ox.Calendar({
date: new Date(0),
events: [
@ -623,8 +623,41 @@ Ox.load('UI', {debug: true, hideScreen: true, showScreen: true, theme: 'modern'}
],
height: window.innerHeight,
range: [-5000, 5000],
width: window.innerWidth,
width: window.innerWidth - 257,
zoom: 2
}).appendTo(Ox.UI.$body).gainFocus();
});
var $panel = Ox.SplitPanel({
elements: [
{
element: $calendar
},
{
collapsible: true,
element: Ox.Element(),
resizable: true,
resize: [128, 256, 384],
size: 256
}
],
orientation: 'horizontal'
}).appendTo(Ox.UI.$body);
$calendar
.bindEvent({
resize: function(foo, size) {
$calendar.options({width: window.innerWidth - $panel.getSize(1)});
}
})
.gainFocus();
Ox.UI.$window.bind({
resize: function(e) {
$calendar.options({
height: window.innerHeight,
width: window.innerWidth - $panel.getSize(1)
});
}
});
});