X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=samples%2Fweb%2FSample%2FTizen%2FWeb%20App%2FModelloHomescreen%2Fproject%2Fjs%2Fmain.js;h=90515dbed3ca8b7ce4e2cb7113b52968629eeb7b;hb=HEAD;hp=b0580620134072160a3a9745078f6d313d63f9a9;hpb=554f643507fb7d2203e5335cf91114f7108b9a9b;p=profile%2Fivi%2Fsdk%2Fweb-sample-build.git diff --git a/samples/web/Sample/Tizen/Web App/ModelloHomescreen/project/js/main.js b/samples/web/Sample/Tizen/Web App/ModelloHomescreen/project/js/main.js index b058062..90515db 100644 --- a/samples/web/Sample/Tizen/Web App/ModelloHomescreen/project/js/main.js +++ b/samples/web/Sample/Tizen/Web App/ModelloHomescreen/project/js/main.js @@ -84,27 +84,26 @@ var init = function() { }); + var checkAnimationConfig = function() { + var animation = Configuration.get("animationEnabled"); + if (animation === undefined || animation) { + $(".rollRight").css("-webkit-animation-play-state", "running"); + $(".rollLeft").css("-webkit-animation-play-state", "running"); + $(".liveBg").css("-webkit-animation-play-state", "running"); + } else { + $(".rollRight").css("-webkit-animation-play-state", "paused"); + $(".rollLeft").css("-webkit-animation-play-state", "paused"); + $(".liveBg").css("-webkit-animation-play-state", "paused"); + } + }; + /* fixed webkit animation bugs */ window.setTimeout(function() { - window.setInterval(function() { - $("#innerRing").removeClass("rollLeft"); - $("#outerRing").removeClass("rollRight"); - window.setTimeout(function() { - $("#innerRing").addClass("rollLeft"); - $("#outerRing").addClass("rollRight"); - }, 50); - - }, 10000); - }, 1000); - window.setTimeout(function() { - window.setInterval(function() { - $('#wrapper .step9').removeClass('liveBg'); - window.setTimeout(function() { - $('#wrapper .step9').addClass('liveBg'); - }, 50); - - }, 7000); - }, 500); + checkAnimationConfig(); + Configuration.addUpdateListener(function() { + checkAnimationConfig(); + }); + }, 1000); /* end fixed webkit animation bugs */ };