Changeset 657
- Timestamp:
- 04/11/10 17:38:49 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js
r656 r657 26 26 $window = jQuery(window), 27 27 28 uiHeight = 0, // Calculated automatically 29 editorMargin = 15, // Margin from window (without padding) 30 editorPadding = 0; // Calculated automatically 28 editorMargin = 15; // Margin from window (without padding) 31 29 32 30 … … 44 42 45 43 function resize () { 46 var screenHeight = $window.height(), 44 // Calculate margins 45 var uiHeight = $box.outerHeight(true) 46 - $iframe.outerHeight(true), 47 editorPadding = $box.outerWidth() - $box.width(), 48 49 // Calculate heights 50 screenHeight = $window.height(), 47 51 iframeHeight = (screenHeight 48 52 - uiHeight 49 53 - (editorMargin * 2)) + 'px', 50 54 55 // Calculate witdths 51 56 screenWidth = $window.width(), 52 57 boxWidth = (screenWidth … … 65 70 $box.find('li.wym_tools_fullscreen a').click(function() { 66 71 if ($box.css('position') != 'fixed') { 67 // Calculate margins68 uiHeight = $box.outerHeight(true) - $iframe.outerHeight(true);69 editorPadding = $box.outerWidth() - $box.width();70 71 72 // Create overlay 72 73 $overlay = jQuery('<div id="wym-fullscreen-overlay"></div>') … … 88 89 }); 89 90 90 // Listen to resize on window91 // Bind event listeners 91 92 $window.bind('resize', resize); 93 $box.find('li.wym_tools_html a').bind('click', resize); 92 94 93 95 // Force resize 94 96 resize(); 95 97 } else { 96 // Stop listening to resize on window98 // Unbind event listeners 97 99 $window.unbind('resize', resize); 100 $box.find('li.wym_tools_html a').unbind('click', resize); 98 101 99 102 // Remove inline styles
Note: See TracChangeset
for help on using the changeset viewer.