delaying hash change not to spoil the transition in chrome

This commit is contained in:
Bartek Szopka
2012-01-12 20:47:42 +01:00
parent 3b5fd448b1
commit 65c456cb47

View File

@@ -213,7 +213,12 @@
// `#/step-id` is used instead of `#step-id` to prevent default browser // `#/step-id` is used instead of `#step-id` to prevent default browser
// scrolling to element in hash // scrolling to element in hash
window.location.hash = "#/" + el.id; //
// and it has to be set after animation finishes, because in chrome it
// causes transtion being laggy
window.setTimeout(function () {
window.location.hash = "#/" + el.id;
}, 1000);
var target = { var target = {
rotate: { rotate: {