0
안녕하세요, 내 이미지 갤러리에 Codecanyon을 사용하고 있습니다. 지금은 무작위로 이미지를 움직이는 애니메이션입니다. 나는 무작위 효과를 제거하고 싶다. 어떤 제안을 어떻게 할 수 있습니까? 아래는 애니메이션의 기능입니다.자바 스크립트에서 임의의 효과를 중지하는 방법
parseAnimationOptions: function (t) {
var i, o = this,
n = ["flipX", "flipY", "rollInX", "rollInY", "rollOutX", "rollOutY", "slideX", "slideY", "slideRow", "slideColumn", "fade"];
return t.animation ? i = t.animation : "*" == o.options.animations ? (i = o.excludeAnimations(n),
i = (Math.random() < .5 ? "" : "-") + i[Math.floor(Math.random() * i.length)]) : (o.selectedAnimations && o.selectedAnimations.length || (o.selectedAnimations = o.options.animations.split(":")),
i = o.excludeAnimations("*" == o.selectedAnimations[0] ? n : o.selectedAnimations[0].split(",")),
i = i[Math.floor(Math.random() * i.length)],
o.selectedAnimations.splice(0, 1)), -1 == n.indexOf(i.replace("-", "")) && (i = "fade"), e.extend(!0, t, {
animation: i,
type: i.replace(/[XY-]/g, ""),
dir: 0 == i.indexOf("-", 0) ? -1 : 1,
axis: i.replace(/[^XY]/g, ""),
duration: t.duration || o.options[i.replace("-", "") + "Duration"] || o.options.duration,
easing: t.easing || o.options[i.replace("-", "") + "Easing"] || o.options.easing
})
}
이 코드는이 Resouce의에서 페이지
$(".magicwall").magicWall({
maxItemWidth: 300,
maxItemHeight: 240,
animations: "rollOutY",
flipXDuration: 500,
});
사용되는 곳마다 Math.random 함수를 제거하십시오. 적절한 논리를 사용하십시오. –
나는 작동하지 않습니다. –
모든 매개 변수를 올바르게 설정 한 것 같습니다. 확실하지는 않지만 'rollOutY'라는 항목이 필요한 배열로 '애니메이션'옵션을 설정하십시오. –