Verified Commit ddc8fff2 authored by Marco Kellershoff's avatar Marco Kellershoff 🤸
Browse files

Fix jump to mark only when loading is hidden

parent 17d8e979
......@@ -368,42 +368,19 @@
if (title) {
document.title = decodeURIComponent(title);
}
var line = url_params.get("l");
if (line) {
var column =
url_params.get("c") ||
0;
setTimeout(
function() {
EDITOR.scrollToLine(
line,
true,
true,
function() {}
);
EDITOR.gotoLine(
line,
column,
true
);
EDITOR.focus();
},
2000
);
}
if (
url_params.get("a") ===
"1"
) {
self.hideLoading();
self.autoRun();
return;
} else {
self.hideLoading();
}
} else {
window.alert("No valid token received");
self.hideLoading();
}
self.hideLoading();
}
);
} catch (ex) {
......@@ -425,9 +402,35 @@
};
this.hideLoading = function() {
var hash = window.location.hash,
loc = hash.indexOf("#!/"),
virtual_url = "",
url_params = null;
window.$("#loading").fadeOut("slow", function() {
window.$("#drawer-toggle-label").fadeIn("slow");
window.$("#app").fadeIn("slow");
window.$("#app").fadeIn("slow", function() {
if (loc === 0 && hash.length > 3) {
virtual_url = hash.substring(3);
url_params = self.getUrlParams(virtual_url);
var line = url_params.get("l");
if (line) {
var column =
url_params.get("c") || 0;
EDITOR.scrollToLine(
line,
true,
true,
function() {}
);
EDITOR.gotoLine(
line,
column,
true
);
EDITOR.focus();
}
}
});
});
};
......
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