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)

\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? 

(My day's about to end, will continue tomorrow)




On Tuesday, April 10, 2018 at 10:27:49 PM UTC+9, BurningTreeC wrote:
>
> oh, yeah, that was pointed out in the official HammerWidgets page, too 
>> (the pointer events block). 
>>
>> While I'm well inside the div, panning very slowly so the div keeps up, 
>> the iframe doesn't block the movement... which made me think of Surgery 
>> games and such.... which gave me the idea of the possibility of creating a 
>> game with this lol 
>>
>> By the way, BTC... wait, maybe I'll post the rest of this thought over at 
>> the official thread
>>
>
> http://moveablefab.tiddlyspot.com/ 
>
> I've made progress - not much widget-tweaking but the fab itself and how 
> the widgets handle states
>

-- 
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/6d824473-c7b9-47c4-afea-bcb89dfb01ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to