>
> Whoa, I just found out by studying your code that actions can be defined 
> in macros... I tried it with your test page just to see if it worked 
> (nothing was changed inside the macros)
>

Oh yes, that's possible :) - that allows many many ideas to become possible 

>
> \define pressStartActions()
> """
> <$action-setfield $tiddler="$:/state/fab-pan-values" $field="center-x" 
> $value={{$:/state/fab-static!!center-x}}/>
> <$action-setfield $tiddler="$:/state/fab-pan-values" $field="center-y" 
> $value={{$:/state/fab-static!!center-y}}/>
> <$action-setfield $tiddler="$:/state/swipe-onoff" $field="text" 
> $value="off"/>
> <$action-setfield $tiddler="$:/state/FABs" $field="text" $value="no"/>
> <$action-setfield $tiddler="$:/state/fab-panning" text="yes"/>
> """
> \end
>
> \define panEndActions()
> """
> <$list filter="[[$:/state/fab-panning]!is[missing]]">
> <$action-setfield $tiddler="$:/state/fab-static" $field="center-x" 
> $value={{$:/state/fab-pan-values!!center-x}}/>
> <$action-setfield $tiddler="$:/state/fab-static" $field="center-y" 
> $value={{$:/state/fab-pan-values!!center-y}}/>
> </$list>
> <$action-deletetiddler $tiddler="$:/state/fab-panning"/>
> <$action-setfield $tiddler="$:/state/swipe-onoff" $field="text" 
> $value="on"/>
> """
> \end
>
> \define swipeUpActions()
> """
> <$list filter="[{$:/state/swipe-onoff}regexp[on]]">
> <$action-setfield $tiddler="$:/state/FABs" $field="text" $value="yes"/>
> </$list>
> """
> \end
>
> \define swipeDownActions()
> """
> <$list 
> filter="[{$:/state/FABs}regexp[yes]addprefix{$:/state/swipe-onoff}regexp[onyes]]">
> <$action-setfield $tiddler="$:/state/FABs" $field="text" $value="no"/>
> </$list>
> """
> \end
>
> <$set name="tv-config-toolbar-class" value="tc-btn-invisible FABitem">
> <$press $targets="tc-fab-press-wrapper" $time="500" 
> $startactions=<<pressStartActions>>>
> <$pan $targets="tc-fab-press-wrapper" 
> $statetiddler="$:/state/fab-pan-values" $endactions=<<panEndActions>>>
> <$swipe $targets="tc-fab-wrapper" $velocity="0.1" $direction="up" 
> $actions=<<swipeUpActions>>>
> <$swipe $targets="tc-fab-wrapper" $velocity="0.1" $direction="down" 
> $actions=<<swipeDownActions>>>
> <div class="tc-fab-wrapper">
> <div class="tc-fab-press-wrapper">
> <div class="FAB-wrapper">
> <$transclude tiddler={{$:/themes/jd/Material/ConfigDB##fab}}/>
> </div>
> </div>
> <$reveal state="$:/state/FABs" type="match" text="yes">
> <div style="position: absolute; top: -60px;">
> <$transclude tiddler={{$:/themes/jd/Material/ConfigDB##fab1}}/>
> </div>
> </$reveal>
> </div>
> </$swipe>
> </$swipe>
> </$pan>
> </$press>
> </$set>
>
> As I understand, we can't have both *press-end* and *pan-start* actions 
> working on the same target div? 
>

better the press-start actions, press-end would mean, you're not holding 
the pointer anymore / the finger has left the screen - then pan-start 
either has already happened or is not possible anymore

 But I don't see why press and pan shouldn't work on the same div, too - 
did you try that and it didn't work?


> (My day's about to end, will continue tomorrow)
>
> no problem, read you next time

BTC 

>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b3a66249-cb63-49bd-8017-47316f47ddcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to