Fixed scroll link on top of the screen when focus mode is active

This commit is contained in:
benweet 2013-12-04 19:33:47 +00:00
parent 95caf6674f
commit 6855d140d8

View File

@ -95,6 +95,7 @@ define([
return; return;
} }
var editorScrollTop = aceEditor.renderer.getScrollTop(); var editorScrollTop = aceEditor.renderer.getScrollTop();
editorScrollTop < 0 && (editorScrollTop = 0);
var previewScrollTop = $previewElt.scrollTop(); var previewScrollTop = $previewElt.scrollTop();
function getDestScrollTop(srcScrollTop, srcSectionList, destSectionList) { function getDestScrollTop(srcScrollTop, srcSectionList, destSectionList) {
// Find the section corresponding to the offset // Find the section corresponding to the offset