summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/animate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-11-27 23:13:12 +0000
committerKarl Berry <karl@freefriends.org>2014-11-27 23:13:12 +0000
commit1a1408f472bf9441bdfb843abe54322dcf13ec31 (patch)
tree932c45b5eab5ea8b566338d640e71832a8d8b006 /Master/texmf-dist/tex/latex/animate
parente230e4df26ca959893b28b41dc5e4f189b7d5d7c (diff)
animate (27nov14)
git-svn-id: svn://tug.org/texlive/trunk@35674 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/animate')
-rw-r--r--Master/texmf-dist/tex/latex/animate/animate.sty45
1 files changed, 34 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index f53bf7a190b..4a74ebf8010 100644
--- a/Master/texmf-dist/tex/latex/animate/animate.sty
+++ b/Master/texmf-dist/tex/latex/animate/animate.sty
@@ -13,7 +13,7 @@
\NeedsTeXFormat{LaTeX2e}
-\def\@anim@version{2014/11/25}
+\def\@anim@version{2014/11/27}
\ProvidesPackage{animate}
[\@anim@version\space PDF animations from files and inline graphics]
@@ -2994,7 +2994,11 @@
a#1.btnPlayRight=this.getField('#1.PlayRight');%
\fi\fi%
%playing state and direction
- \if@anim@morejs a#1.playsRight=true;\fi%
+ \if@anim@step
+ \if@anim@palindrome a#1.playsRight=true;\fi%
+ \else%
+ \if@anim@morejs a#1.playsRight=true;\fi%
+ \fi%
a#1.isPaused=false;%
\if@anim@step\else
a#1.playing=false;%
@@ -3257,15 +3261,16 @@
a#1.isPaused=true;%
}};%
a#1.playBwd=function(){%
- if(a#1.idx==0){a#1.stopLast();}%
+ if(a#1.idx==0||!a#1.isPaused){a#1.stopLast();}%
a#1.playLeft();%
};%
a#1.playFwd=function(){%
- if(a#1.idx==\@anim@maxframe){a#1.stopFirst();}%
+ if(a#1.idx==\@anim@maxframe||!a#1.isPaused){a#1.stopFirst();}%
a#1.playRight();%
};%
\fi%
\fi%
+ %animation API for labelled anims
\ifx\empty\@anim@label\empty\else
if(typeof anim==='undefined'){anim=new Array();}%
if(typeof anim['\@anim@label']==='undefined'){%
@@ -3282,8 +3287,8 @@
}else{a#1.setFps(f);}%
},%
get dt(){return 1000/(1e-6+a#1.fps)/a#1.sm;},%
+ get playsFwd(){return a#1.playsRight;},%
\fi
- get playsFwd(){return a#1.playsRight;},%
get numFrames(){return \@anim@frames;},%
get frameNum(){return a#1.idx;},%
set frameNum(f){%
@@ -3337,14 +3342,17 @@
\def\@anim@otherjscript#1{%
\xdef\@anim@otherjscriptkey{%
/PC <</S/JavaScript/JS (% PageClose
- \if@anim@step\else
+ \if@anim@step%
+ \if@anim@palindrome a#1.playsRight=true;\fi%
+ \else
if(a#1.playing){
\if@anim@autopause
a#1.pause();%
\else
a#1.pause(true);% stop
- \fi
+ \fi%
}%
+ \if@anim@morejs if(!a#1.isPaused)a#1.playsRight=true;\fi%
\fi
%re-display poster frame
if(!a#1.isPaused){% i.e. if stopped
@@ -3387,10 +3395,25 @@
}%
\fi
a#1.isPaused=true;%
- \else%
- \if@anim@morejs
- if(a#1.playsRight){a#1.playRight();}else{a#1.playLeft();}%
- \else
+ \else
+ if(!a#1.isPaused)a#1.stopFirst();%
+ \if@anim@morejs%
+ \if@anim@palindrome
+ if(a#1.idx==0)a#1.playsRight=true;%
+ if(a#1.idx==\@anim@maxframe)a#1.playsRight=false;%
+ \else
+ if(a#1.idx==\@anim@maxframe&&a#1.playsRight)a#1.stopFirst();%
+ if(a#1.idx==0&&!a#1.playsRight)a#1.stopLast();%
+ \fi
+ if(a#1.playsRight){%
+ a#1.playRight();%
+ }else{%
+ a#1.playLeft();%
+ }%
+ \else%
+ \if@anim@loop\else
+ if(a#1.idx==\@anim@maxframe){a#1.stopFirst();}%
+ \fi
a#1.playRight();%
\fi%
\fi%