Skip to content
Snippets Groups Projects
Commit 27973f15 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Merge branch 'release-2.3'

parents ab3de976 a03233c4
No related merge requests found
...@@ -117,9 +117,11 @@ function nextPage() { ...@@ -117,9 +117,11 @@ function nextPage() {
scrollToSelected(); scrollToSelected();
} }
function scrollToSelected() { function scrollToSelected() {
$('#collapse1').animate({ if($('#collapse1').length > 0 && $('#collapse1 .selected').length > 0) {
scrollTop: $('#collapse1 .selected').offset().top-$('#collapse1').offset().top+$('#collapse1').scrollTop()-12 $('#collapse1').animate({
}); scrollTop: $('#collapse1 .selected').offset().top-$('#collapse1').offset().top+$('#collapse1').scrollTop()-12
});
}
} }
// Toggle side menu // Toggle side menu
function toggleSideNav() { function toggleSideNav() {
......
...@@ -114,11 +114,7 @@ var Zoomy = { ...@@ -114,11 +114,7 @@ var Zoomy = {
load: function(src, callback) { load: function(src, callback) {
if(typeof this.canvas === "undefined") return; if(typeof this.canvas === "undefined") return;
var img = new Image(); var img = new Image();
img.onloadstart = function () { console.log('Loading...'); };
img.onprogress = function (e) { console.log(e.loaded / e.total * 100); };
img.onload = function() { Zoomy.finishLoad(img); if(typeof callback !== "undefined") callback(); } img.onload = function() { Zoomy.finishLoad(img); if(typeof callback !== "undefined") callback(); }
img.onerror = function () { /* Load failed. Show a custom error message. */ }
img.onloadend = function () { /* Load either either succeeded or failed. Either way, hide the progress bar. */ };
img.src = src; img.src = src;
}, },
finishLoad: function(img) { finishLoad: function(img) {
...@@ -150,7 +146,6 @@ var Zoomy = { ...@@ -150,7 +146,6 @@ var Zoomy = {
this.context.restore(); this.context.restore();
// Minimap // Minimap
console.log(this.showMinimap);
if(!this.showMinimap) return; if(!this.showMinimap) return;
if(this.minimap == null) { if(this.minimap == null) {
this.minimap = this.initMinimap(); this.minimap = this.initMinimap();
......
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