Ticket #1262: Xinha-SizeItDown.js.patch
| File Xinha-SizeItDown.js.patch, 2.8 kB (added by guest, 4 years ago) |
|---|
-
modules/FullScreen/full-screen.js
1 1 function FullScreen(editor, args) 2 2 { 3 3 this.editor = editor; 4 this.originalSizes = null; 4 5 editor._superclean_on = false; 5 6 cfg = editor.config; 6 7 … … 49 50 e._sizing = true; 50 51 // Width & Height of window 51 52 var dim = Xinha.viewportSize(); 53 if(e.config.fullScreenSizeDownMethod == 'restore') 54 { 55 e.originalSizes = { 56 x: parseInt(e._htmlArea.style.width), 57 y: parseInt(e._htmlArea.style.height), 58 dim: dim 59 }; 60 } 52 61 53 62 var h = dim.y - e.config.fullScreenMargins[0] - e.config.fullScreenMargins[2]; 54 63 var w = dim.x - e.config.fullScreenMargins[1] - e.config.fullScreenMargins[3]; … … 62 71 { 63 72 if(e._isFullScreen || e._sizing) return false; 64 73 e._sizing = true; 65 e.initSize(); 74 75 if(e.originalSizes != null) 76 { 77 var os = e.originalSizes; 78 var nDim = Xinha.viewportSize(); 79 var nW = os.x + (nDim.x - os.dim.x); 80 var nH = os.y + (nDim.y - os.dim.y); 81 e.sizeEditor( nW + 'px', nH + 'px', e.config.sizeIncludesBars, e.config.sizeIncludesPanels); 82 e.originalSizes = null; 83 } 84 else e.initSize(); 85 66 86 e._sizing = false; 67 87 if ( e._toolbarObjects.fullscreen ) e._toolbarObjects.fullscreen.swapImage([_editor_url + cfg.imgURL + 'ed_buttons_main.gif',8,0]); 68 88 } -
XinhaCore.js
853 853 */ 854 854 this.fullScreenMargins = [0,0,0,0]; 855 855 856 857 /** Specify the method that is being used to calculate the editor's size<br/> 858 * when we return from fullscreen mode. 859 * There are two choices: 860 * 861 * <table border="1"> 862 * <tr> 863 * <td><em>initSize</em></td> 864 * <td>Use the internal Xinha.initSize() method to calculate the editor's 865 * dimensions. This is suitable for most usecases.</td> 866 * </tr> 867 * <tr> 868 * <td><em>restore</em></td> 869 * <td>The editor's dimensions will be stored before going into fullscreen 870 * mode and restored when we return to normal mode, taking a possible 871 * window resize during fullscreen in account.</td> 872 * </tr> 873 * </table> 874 * 875 * Default: <code>"initSize"</code> 876 * @type String 877 */ 878 this.fullScreenSizeDownMethod = 'initSize'; 879 856 880 /** This array orders all buttons except plugin buttons in the toolbar. Plugin buttons typically look for one 857 881 * a certain button in the toolbar and place themselves next to it. 858 882 * Default value:
