Comparing version 0.22.0 to 0.22.1
# apiDoc Changelog | ||
#### 0.22.1 | ||
* Fix initial jump with hashed URL (#871) by @rafaelgssa | ||
#### 0.22.0 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "apidoc", | ||
"version": "0.22.0", | ||
"version": "0.22.1", | ||
"description": "RESTful web API Documentation Generator", | ||
@@ -5,0 +5,0 @@ "author": "Peter Rottmann <rottmann@inveris.de>", |
@@ -57,5 +57,15 @@ require.config({ | ||
// load google web fonts | ||
loadGoogleFontCss(); | ||
// Load google web fonts. | ||
WebFont.load({ | ||
active: function() { | ||
// Only init after fonts are loaded. | ||
init($, _, locale, Handlebars, apiProject, apiData, prettyPrint, sampleRequest, semver); | ||
}, | ||
google: { | ||
families: ['Source Code Pro', 'Source Sans Pro:n4,n6,n7'] | ||
} | ||
}); | ||
}); | ||
function init($, _, locale, Handlebars, apiProject, apiData, prettyPrint, sampleRequest, semver) { | ||
var api = apiData.api; | ||
@@ -391,3 +401,3 @@ | ||
// Bootstrap Scrollspy | ||
$(this).scrollspy({ target: '#scrollingNav', offset: 18 }); | ||
$(this).scrollspy({ target: '#scrollingNav' }); | ||
@@ -403,9 +413,2 @@ // Content-Scroll on Navigation click. | ||
// Quickjump on Pageload to hash position. | ||
if(window.location.hash) { | ||
var id = window.location.hash; | ||
if ($(id).length > 0) | ||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 0); | ||
} | ||
/** | ||
@@ -609,7 +612,13 @@ * Check if Parameter (sub) List has a type Field. | ||
$('#compareAllWithPredecessor').trigger('click'); | ||
} | ||
if (window.location.hash) { | ||
var id = window.location.hash; | ||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) - 18 }, 0); | ||
} | ||
// Quick jump on page load to hash position. | ||
// Should happen after setting the main version | ||
// and after triggering the click on the compare button, | ||
// as these actions modify the content | ||
// and would make it jump to the wrong position or not jump at all. | ||
if (window.location.hash) { | ||
var id = window.location.hash; | ||
if ($(id).length > 0) | ||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 0); | ||
} | ||
@@ -873,17 +882,2 @@ | ||
/** | ||
* Load google fonts. | ||
*/ | ||
function loadGoogleFontCss() { | ||
WebFont.load({ | ||
active: function() { | ||
// Update scrollspy | ||
$(window).scrollspy('refresh') | ||
}, | ||
google: { | ||
families: ['Source Code Pro', 'Source Sans Pro:n4,n6,n7'] | ||
} | ||
}); | ||
} | ||
/** | ||
* Return ordered entries by custom order and append not defined entries to the end. | ||
@@ -918,3 +912,2 @@ * @param {String[]} elements | ||
} | ||
}); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1573804
5897