- Timestamp:
- 11/09/09 22:59:41 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
XinhaCore.js (modified) (1 diff)
-
modules/FullScreen/full-screen.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r1209 r1219 900 900 */ 901 901 this.fullScreenMargins = [0,0,0,0]; 902 903 904 /** Specify the method that is being used to calculate the editor's size<br/> 905 * when we return from fullscreen mode. 906 * There are two choices: 907 * 908 * <table border="1"> 909 * <tr> 910 * <td><em>initSize</em></td> 911 * <td>Use the internal Xinha.initSize() method to calculate the editor's 912 * dimensions. This is suitable for most usecases.</td> 913 * </tr> 914 * <tr> 915 * <td><em>restore</em></td> 916 * <td>The editor's dimensions will be stored before going into fullscreen 917 * mode and restored when we return to normal mode, taking a possible 918 * window resize during fullscreen in account.</td> 919 * </tr> 920 * </table> 921 * 922 * Default: <code>"initSize"</code> 923 * @type String 924 */ 925 this.fullScreenSizeDownMethod = 'initSize'; 902 926 903 927 /** This array orders all buttons except plugin buttons in the toolbar. Plugin buttons typically look for one -
trunk/modules/FullScreen/full-screen.js
r1113 r1219 2 2 { 3 3 this.editor = editor; 4 this.originalSizes = null; 4 5 editor._superclean_on = false; 5 6 var cfg = editor.config; … … 54 55 // Width & Height of window 55 56 var dim = Xinha.viewportSize(); 57 if(e.config.fullScreenSizeDownMethod == 'restore') 58 { 59 e.originalSizes = { 60 x: parseInt(e._htmlArea.style.width), 61 y: parseInt(e._htmlArea.style.height), 62 dim: dim 63 }; 64 } 56 65 57 66 var h = dim.y - e.config.fullScreenMargins[0] - e.config.fullScreenMargins[2]; … … 67 76 if(e._isFullScreen || e._sizing) return false; 68 77 e._sizing = true; 69 e.initSize(); 78 79 if(e.originalSizes != null) 80 { 81 var os = e.originalSizes; 82 var nDim = Xinha.viewportSize(); 83 var nW = os.x + (nDim.x - os.dim.x); 84 var nH = os.y + (nDim.y - os.dim.y); 85 e.sizeEditor( nW + 'px', nH + 'px', e.config.sizeIncludesBars, e.config.sizeIncludesPanels); 86 e.originalSizes = null; 87 } 88 else e.initSize(); 89 70 90 e._sizing = false; 71 91 if ( e._toolbarObjects.fullscreen ) e._toolbarObjects.fullscreen.swapImage(cfg.iconList.fullscreen);
