How to disable sliding animation when changing views.
For example, when changing from view 1 to view 2, there is a sliding animation. how do I disable it?
Thank you
Is it due to that it takes long time to load View 2?
Hi @AY2021S1 ,
there is so far I know no such supported setting in Vuforia Studio ,. When I check the current implementation of twx.app.fn.navigate(target) but also $scope.navigate(target) // is the same// :
twx.app.fn.navigate = function (target) {
if( window.location.hash.indexOf('#/tab/') >= 0 ) {
window.location.hash = '#/tab/' + target;
} else {
window.location.hash = '#/' + target;
}
};
So as we can see this the default setting of the window.location.hash. So we can try some techniques to change the default behavior, but I am not sure if we can override it simple.
In some forums we can find some hints , but I did test it very detailed:
1.) https://stackoverflow.com/questions/1489624/modifying-location-hash-without-page-scrolling
So, I did test only one possible suggestion but I did not get different behavior after quick test in the preview and on Android, but you can still test may be at least it could work.
So, test something like this:
function changeHashWithoutScrolling(hash) {
var id = hash.replace(/^.*#/, '')
if(history.pushState) history.pushState(null, null,hash);
else window.location.hash = hash;
}
//====================
$scope.MyNav = function (target) {
pushHashAndFixTargetSelector('#/' + target)
}
//
$scope.MyNav("Home")