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