From b19e4c0c792c05c8c5585f2f6dd2cd893f600e84 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Mon, 30 Jan 2012 22:26:38 +0000 Subject: [PATCH] fix more resize bugs --- source/Ox.UI/js/Video/Ox.VideoEditor.js | 4 ++-- source/Ox.UI/js/Window/Ox.Dialog.js | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index a906922d..0f20e479 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -454,8 +454,8 @@ Ox.VideoEditor = function(options, self) { title: 'Keyboard Shortcuts', width: 256 }).open(); - } else if (id == 'download') { - that.triggerEvent('download'); + } else if (id == 'downloadVideo') { + that.triggerEvent('downloadVideo'); } else if (id == 'downloadSelection') { that.triggerEvent('downloadSelection', { 'in': self.options['in'], diff --git a/source/Ox.UI/js/Window/Ox.Dialog.js b/source/Ox.UI/js/Window/Ox.Dialog.js index 32c407b5..5d9ea2a3 100644 --- a/source/Ox.UI/js/Window/Ox.Dialog.js +++ b/source/Ox.UI/js/Window/Ox.Dialog.js @@ -291,8 +291,6 @@ Ox.Dialog = function(options, self) { height: self.options.maxHeight }, true); self.maximized = !self.maximized; - data = {width: self.options.width, height: self.options.height}; - that.triggerEvent('resize', data).triggerEvent('resizeend', data); } function reset(animate) { @@ -315,8 +313,6 @@ Ox.Dialog = function(options, self) { left: left, top: top }), animate); - data = {width: self.options.width, height: self.options.height}; - that.triggerEvent('resize', data).triggerEvent('resizeend', data); } function resizestart(event) { @@ -564,8 +560,10 @@ Ox.Dialog = function(options, self) { function setCSS(css, animate) { var ms = animate ? 100 : 0, 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 = Ox.extend({ left: offset.left, top: offset.top, @@ -582,6 +580,7 @@ Ox.Dialog = function(options, self) { self.options.height = css.height; self.minLeft = 24 - self.options.width; self.minTop = self.hasButtons ? 24 - self.options.height - self.barsHeight : 0; + Ox.print('DIALOG set css RESIZE') triggerEvent && that.triggerEvent('resize', { width: self.options.width, height: self.options.height