diff options
Diffstat (limited to 'macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex')
-rw-r--r-- | macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex b/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex index 1419c8b297..aef2616d3d 100644 --- a/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex +++ b/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex @@ -35,7 +35,8 @@ \parindent0pt \thispagestyle{empty} - +% sortName is the name of the active tiled sort. At the end of a sort +% if it is the choo sort, we start the emj sort. \customFinishJS{% if(sortName=="choo") { var f=this.getField("message"); @@ -46,27 +47,33 @@ \begin{document} -The new \textsf{acrosort} allows for multiple sorts of pictures. +The new \textsf{acrosort} allows for multiple tiled bubble sorts. +% These apply to both tiled bubble sorts \appendClearSortJS{this.resetForm("message");} \appendStopSortJS{this.resetForm("message");} - \begin{minipage}[t]{.5\linewidth-5pt}\kern0pt -\begin{center} -\insertTiles{choo}{\linewidth}{4}{5} +\begin{center}\fboxsep1bp\fboxrule2bp +\fbox{\makebox[0pt][l]{\makebox[\linewidth][c]{The choo tiled sort}}% + \insertTiles{choo}{\linewidth}{4}{5}}% \end{center} +% the \customStartJS and \appendStartSortJS apply only to choo, since they are in a group (minipage) \smallskip\customStartJS{var f=this.getField("message"); f.value=("Starting the choo sort");} +% if Ctrl key is not down, we fool the \customFinishJS by renaming sortName, that way, simply +% pressing the Press Me button does not activate the emj sort on finish. \appendStartSortJS{sortName=(event.modifier)?"choo":"";} \centering\StartSort[\TU{Click to sort the train, press Ctrl-Click to sort both}]{choo}{}{12bp}\quad\StopSort{}{12bp}\quad\ClearSort{choo}{}{12bp}\par\medskip \end{minipage}\hfill % \begin{minipage}[t]{.5\linewidth-5pt}\kern0pt -\begin{center} -\insertTiles{emj}{.5\linewidth}{4}{4} +\begin{center}\fboxsep1bp\fboxrule2bp +\fbox{\makebox[0pt][l]{\makebox[.5\linewidth]{The emj tiled sort}}% + \insertTiles{emj}{.5\linewidth}{4}{4}} \end{center} +% the \customStartJS and \appendStartSortJS apply only to emj, since they are in a group (minipage) \smallskip\customStartJS{var f=this.getField("message"); f.value=("Starting the emj sort");} \centering\StartSort{emj}{}{12bp}\quad\StopSort{}{12bp}\quad\ClearSort{emj}{}{12bp} \end{minipage} |