Commit b945edd9 authored by d11e9's avatar d11e9

call onResize when setting default size from cache

parent bdb5a09f
...@@ -281,25 +281,23 @@ input[readonly] { ...@@ -281,25 +281,23 @@ input[readonly] {
function setEditorSize (delta) { function setEditorSize (delta) {
$('#righthand-panel').css("width", delta); $('#righthand-panel').css("width", delta);
$('#editor').css("right", delta); $('#editor').css("right", delta);
onResize();
} }
$(document).mouseup(function(e){ $(document).mouseup(function(e){
if (dragging) { if (dragging) {
var delta = $body.width() - e.pageX+2; var delta = $body.width() - e.pageX+2;
setEditorSize( delta )
$('#ghostbar').remove(); $('#ghostbar').remove();
$(document).unbind('mousemove'); $(document).unbind('mousemove');
dragging = false; dragging = false;
setEditorSize( delta )
window.localStorage.setItem( EDITOR_SIZE_CACHE_KEY, delta ); window.localStorage.setItem( EDITOR_SIZE_CACHE_KEY, delta );
onResize();
} }
}); });
// set cached defaults // set cached defaults
var cachedSize = window.localStorage.getItem( EDITOR_SIZE_CACHE_KEY ); var cachedSize = window.localStorage.getItem( EDITOR_SIZE_CACHE_KEY );
if (cachedSize) { if (cachedSize) setEditorSize( cachedSize );
setEditorSize( cachedSize )
}
// ----------------- editor ---------------------- // ----------------- editor ----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment