diff --git a/apps/common/main/lib/controller/ExternalOleEditor.js b/apps/common/main/lib/controller/ExternalOleEditor.js index 35de11350..3f1603b65 100644 --- a/apps/common/main/lib/controller/ExternalOleEditor.js +++ b/apps/common/main/lib/controller/ExternalOleEditor.js @@ -98,12 +98,16 @@ define([ 'drag': _.bind(function(o, state){ externalEditor && externalEditor.serviceCommand('window:drag', state == 'start'); },this), + 'resize': _.bind(function(o, state){ + externalEditor && externalEditor.serviceCommand('window:resize', state == 'start'); + },this), 'show': _.bind(function(cmp){ var h = this.oleEditorView.getHeight(), innerHeight = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top'); if (innerHeight>h && h<700 || innerHeight', + '
', '
', '
', '
', @@ -140,15 +143,18 @@ define([ this.$window.find('> .body').css('height', height-header_height); this.$window.find('> .body > .box').css('height', height-85); - - var top = (Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top') - parseInt(height)) / 2; - var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2; - - this.$window.css('left',left); - this.$window.css('top', Common.Utils.InternalSettings.get('window-inactive-area-top') + top); } }, + setInCenter: function() { + var height = this.$window.height(), + top = (Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top') - parseInt(height)) / 2, + left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2; + + this.$window.css('left',left); + this.$window.css('top', Common.Utils.InternalSettings.get('window-inactive-area-top') + top); + }, + setPlaceholder: function(placeholder) { this._placeholder = placeholder; }, diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index cb89960de..9bf2772b0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1382,7 +1382,7 @@ define([ Common.Gateway.internalMessage('processMouse', {event: 'mouse:up'}); }) .mousemove($.proxy(function(e){ - if (this.isDiagramDrag) { + if (this.isDiagramDrag || this.isDiagramResize) { Common.Gateway.internalMessage('processMouse', {event: 'mouse:move', pagex: e.pageX*Common.Utils.zoom(), pagey: e.pageY*Common.Utils.zoom()}); } },this)); @@ -2529,6 +2529,9 @@ define([ case 'window:drag': this.isDiagramDrag = data.data; break; + case 'window:resize': + this.isDiagramResize = data.data; + break; case 'processmouse': this.onProcessMouse(data.data); break;