Fix syncscroll.js and index.js have circular dependency cause Reference Errors

This commit is contained in:
Wu Cheng-Han 2016-09-18 16:51:19 +08:00
parent b7200d7910
commit 38b1477736
2 changed files with 26 additions and 14 deletions

View file

@ -924,6 +924,8 @@ $(window).on('error', function () {
//setNeedRefresh();
});
setupSyncAreas(ui.area.codemirrorScroll, ui.area.view, ui.area.markdown);
function autoSyncscroll() {
if (editorHasFocus()) {
syncScrollToView();