fix resize bugs in calendar, list calendar etc
This commit is contained in:
parent
70376be049
commit
93fe766c7b
6 changed files with 40 additions and 19 deletions
|
@ -1033,8 +1033,8 @@ Ox.Calendar = function(options, self) {
|
|||
|
||||
function renderCalendar() {
|
||||
self.contentHeight = Math.max(
|
||||
self.lineEvents.length * 16 + 16, // fixme: why +16 ?,
|
||||
self.options.height - (self.options.showToolbar * 24) - 16 - 16
|
||||
self.lineEvents.length * 16 + 16, // fixme: why +16 ?
|
||||
self.options.height - (self.options.showToolbar * 24)
|
||||
// self.options.height - 56 // 24 + 16 + 16
|
||||
);
|
||||
self.$content.css({height: self.contentHeight + 'px'});
|
||||
|
@ -1320,6 +1320,7 @@ Ox.Calendar = function(options, self) {
|
|||
};
|
||||
|
||||
that.resizeCalendar = function() {
|
||||
Ox.print('RESIZE CALENDAR')
|
||||
self.options.width = that.width();
|
||||
self.options.height = that.height();
|
||||
self.options.showZoombar && self.$zoomInput.options({size: self.options.width});
|
||||
|
|
|
@ -241,7 +241,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
.bindEvent({
|
||||
resize: function(data) {
|
||||
// triggered by SplitPanel
|
||||
$element.resizeCalendar();
|
||||
self.$calendar.resizeCalendar();
|
||||
},
|
||||
select: selectEvent
|
||||
});
|
||||
|
@ -619,6 +619,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
if (key == 'height') {
|
||||
// fixme: should be .resizeList
|
||||
self.$list.size();
|
||||
self.$calendar.resizeCalendar();
|
||||
} else if (key == 'width') {
|
||||
self.$calendar.resizeCalendar();
|
||||
}
|
||||
|
|
|
@ -439,6 +439,7 @@ Ox.List = function(options, self) {
|
|||
var height = getHeight(),
|
||||
lastItemHeight = height % self.options.itemHeight || self.options.itemHeight,
|
||||
visibleItems = Math.ceil(height / self.options.itemHeight);
|
||||
Ox.print('FFP!!!', height)
|
||||
if (self.listLength < visibleItems) {
|
||||
Ox.range(self.listLength, visibleItems).forEach(function(i) {
|
||||
var $item = Ox.ListItem({
|
||||
|
@ -757,7 +758,8 @@ Ox.List = function(options, self) {
|
|||
self.$items[pos].appendTo(self.$pages[0]);
|
||||
timeA += +new Date() - time0;
|
||||
});
|
||||
fillFirstPage();
|
||||
// timeout needed so that height is present
|
||||
setTimeout(fillFirstPage, 0);
|
||||
self.selected.length && scrollToPosition(self.selected[0]);
|
||||
Ox.Log('List', 'CONSTRUCT:', timeC, 'APPEND:', timeA);
|
||||
// that.triggerEvent('init', {items: self.options.items.length});
|
||||
|
|
|
@ -294,6 +294,9 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
|
||||
function dragend(e) {
|
||||
if (self.options.showWidget) {
|
||||
self.options.type == 'event'
|
||||
? self.$calendar.resizeCalendar()
|
||||
: self.$map.resizeMap();
|
||||
that.triggerEvent('resizewidget', {size: self.options.widgetSize});
|
||||
}
|
||||
}
|
||||
|
@ -439,6 +442,13 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
|
||||
function toggleLayer() {
|
||||
self.options.collapsed = !self.options.collapsed;
|
||||
if (
|
||||
!self.options.collapsed
|
||||
&& self.options.type == 'place'
|
||||
&& self.options.showWidget
|
||||
) {
|
||||
self.$map.resizeMap();
|
||||
}
|
||||
if (self.options.collapsed) {
|
||||
self.editing && that.blurItem();
|
||||
self.$annotations.loseFocus();
|
||||
|
|
|
@ -28,6 +28,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
clickLink: null,
|
||||
cuts: [],
|
||||
duration: 0,
|
||||
download: false,
|
||||
enableSubtitles: false,
|
||||
find: '',
|
||||
fps: 25,
|
||||
|
@ -426,9 +427,9 @@ Ox.VideoEditor = function(options, self) {
|
|||
{id: 'largeTimeline', title: 'Hide Large Timeline', disabled: true},
|
||||
{id: 'subtitlesTimeline', title: 'Hide Subtitles on Large Timeline', disabled: true},
|
||||
{},
|
||||
{id: 'downloadVideo', title: 'Download Video...', disabled: true},
|
||||
{id: 'downloadSelection', title: 'Download Selection...', disabled: true},
|
||||
{id: 'embedSelection', title: 'Embed Selection...', disabled: true},
|
||||
{id: 'downloadVideo', title: 'Download Video...', disabled: !self.options.download },
|
||||
{id: 'downloadSelection', title: 'Download Selection...', disabled: !self.options.download},
|
||||
{id: 'embedSelection', title: 'Embed Selection...', disabled: !self.options.download},
|
||||
{},
|
||||
{id: 'keyboard', title: 'Keyboard Shortcuts...', keyboard: 'h'}
|
||||
],
|
||||
|
@ -453,6 +454,18 @@ Ox.VideoEditor = function(options, self) {
|
|||
title: 'Keyboard Shortcuts',
|
||||
width: 256
|
||||
}).open();
|
||||
} else if (id == 'download') {
|
||||
that.triggerEvent('download');
|
||||
} else if (id == 'downloadSelection') {
|
||||
that.triggerEvent('downloadSelection', {
|
||||
'in': self.options['in'],
|
||||
out: self.options.out,
|
||||
});
|
||||
} else if (id == 'embedSelection') {
|
||||
that.triggerEvent('embedSelection', {
|
||||
'in': self.options['in'],
|
||||
out: self.options.out,
|
||||
});
|
||||
}
|
||||
},
|
||||
change: function(data) {
|
||||
|
|
|
@ -271,7 +271,7 @@ Ox.Dialog = function(options, self) {
|
|||
}
|
||||
|
||||
function maximize() {
|
||||
var offset = that.offset();
|
||||
var data, offset = that.offset();
|
||||
decenter();
|
||||
if (!self.maximized) {
|
||||
self.originalLeft = offset.left;
|
||||
|
@ -291,14 +291,12 @@ Ox.Dialog = function(options, self) {
|
|||
height: self.options.maxHeight
|
||||
}, true);
|
||||
self.maximized = !self.maximized;
|
||||
that.triggerEvent('resize', {
|
||||
width: self.options.width,
|
||||
height: self.options.height
|
||||
});
|
||||
data = {width: self.options.width, height: self.options.height};
|
||||
that.triggerEvent('resize', data).triggerEvent('resizeend', data);
|
||||
}
|
||||
|
||||
function reset(animate) {
|
||||
var offset, left, top;
|
||||
var data, left, offset, top;
|
||||
if (!self.centered) {
|
||||
offset = that.offset();
|
||||
left = Ox.limit(
|
||||
|
@ -317,12 +315,8 @@ Ox.Dialog = function(options, self) {
|
|||
left: left,
|
||||
top: top
|
||||
}), animate);
|
||||
/*
|
||||
that.triggerEvent('resize', {
|
||||
width: self.options.width,
|
||||
height: self.options.height
|
||||
});
|
||||
*/
|
||||
data = {width: self.options.width, height: self.options.height};
|
||||
that.triggerEvent('resize', data).triggerEvent('resizeend', data);
|
||||
}
|
||||
|
||||
function resizestart(event) {
|
||||
|
|
Loading…
Reference in a new issue