Changeset 1219 for trunk/modules


Ignore:
Timestamp:
11/10/09 04:59:41 (10 years ago)
Author:
gogo
Message:

Ticket #1262

Alternative method for restoring from fullscreen mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/FullScreen/full-screen.js

    r1113 r1219  
    22{ 
    33  this.editor = editor; 
     4  this.originalSizes = null; 
    45  editor._superclean_on = false; 
    56  var cfg = editor.config; 
     
    5455    // Width & Height of window 
    5556    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    } 
    5665 
    5766    var h = dim.y - e.config.fullScreenMargins[0] -  e.config.fullScreenMargins[2]; 
     
    6776    if(e._isFullScreen || e._sizing) return false; 
    6877    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 
    7090    e._sizing = false; 
    7191    if ( e._toolbarObjects.fullscreen ) e._toolbarObjects.fullscreen.swapImage(cfg.iconList.fullscreen);  
Note: See TracChangeset for help on using the changeset viewer.