fix more resize bugs

This commit is contained in:
rlx 2012-01-30 22:26:38 +00:00
parent 93fe766c7b
commit b19e4c0c79
2 changed files with 6 additions and 7 deletions

View file

@ -454,8 +454,8 @@ Ox.VideoEditor = function(options, self) {
title: 'Keyboard Shortcuts', title: 'Keyboard Shortcuts',
width: 256 width: 256
}).open(); }).open();
} else if (id == 'download') { } else if (id == 'downloadVideo') {
that.triggerEvent('download'); that.triggerEvent('downloadVideo');
} else if (id == 'downloadSelection') { } else if (id == 'downloadSelection') {
that.triggerEvent('downloadSelection', { that.triggerEvent('downloadSelection', {
'in': self.options['in'], 'in': self.options['in'],

View file

@ -291,8 +291,6 @@ Ox.Dialog = function(options, self) {
height: self.options.maxHeight height: self.options.maxHeight
}, true); }, true);
self.maximized = !self.maximized; self.maximized = !self.maximized;
data = {width: self.options.width, height: self.options.height};
that.triggerEvent('resize', data).triggerEvent('resizeend', data);
} }
function reset(animate) { function reset(animate) {
@ -315,8 +313,6 @@ 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', data).triggerEvent('resizeend', data);
} }
function resizestart(event) { function resizestart(event) {
@ -564,8 +560,10 @@ Ox.Dialog = function(options, self) {
function setCSS(css, animate) { function setCSS(css, animate) {
var ms = animate ? 100 : 0, var ms = animate ? 100 : 0,
offset = that.offset(), offset = that.offset(),
triggerEvent = (css.width && css.width != self.options.width) triggerEvent = self.isOpen && (
(css.width && css.width != self.options.width)
|| (css.height && css.height != self.options.height) || (css.height && css.height != self.options.height)
);
css = Ox.extend({ css = Ox.extend({
left: offset.left, left: offset.left,
top: offset.top, top: offset.top,
@ -582,6 +580,7 @@ Ox.Dialog = function(options, self) {
self.options.height = css.height; self.options.height = css.height;
self.minLeft = 24 - self.options.width; self.minLeft = 24 - self.options.width;
self.minTop = self.hasButtons ? 24 - self.options.height - self.barsHeight : 0; self.minTop = self.hasButtons ? 24 - self.options.height - self.barsHeight : 0;
Ox.print('DIALOG set css RESIZE')
triggerEvent && that.triggerEvent('resize', { triggerEvent && that.triggerEvent('resize', {
width: self.options.width, width: self.options.width,
height: self.options.height height: self.options.height