User Tools

Site Tools


gestures:touch:simple:geometric:simple-chord:row

Row Gesture (Chords)

(Touch → Geometric → Simple-Chord → The Row Gesture)

The 3 finger Row Hold Gesture
<Gesture id="3-row-hold" type="hold">
    <match>
        <action>
            <initial>
                <point event_duration_min="200" translation_max="2"/>
                <cluster point_number="3" orientation="horizontal" separation_y_max="150" separation_x_max="10"/>
            </initial>
        </action>
    </match>       
    <analysis>
        <algorithm>
            <library module="row"/>
            <returns>
                <property id="row_x" result="x"/>
                <property id="row_y" result="y"/>
                <property id="row_n" result="n"/>
            </returns>
        </algorithm>
    </analysis>    
    <mapping>
        <update dispatch_type="discrete" dispatch_reset="cluster_remove">
            <gesture_event type="hold">
                <property ref="row_x"/>
                <property ref="row_y"/>
                <property ref="row_n"/>
            </gesture_event>
        </update>
    </mapping>
</Gesture>

The 2 finger Row Swipe Gesture

<Gesture id="n-row-swipe" type="swipe">
    <match>
        <action>
            <initial>
                <cluster point_number="2" orientation="horizontal" separation_y_max="150" separation_x_max="10"/>
                <event touch_event="touchEnd"/>
            </initial>
        </action>
    </match>       
    <analysis>
        <algorithm class="kinemetric" type="discrete">
            <library module="row"/>
            <variables>
              <property id="swipe_dx" var="etm_ddx" return="etm_dx" var_max="1"/>
              <property id="swipe_dy" var="etm_ddy" return="etm_dy" var_max="1"/>
          </variables>
          <returns>
              <property id="swipe_dx" result="etm_dx"/>
              <property id="swipe_dy" result="etm_dy"/>
          </returns>
        </algorithm>
    </analysis>    
    <mapping>
        <update dispatch_type="discrete" dispatch_mode="cluster_remove" dispatch_reset="cluster_remove">
          <gesture_event type="swipe">
              <property ref="swipe_dx" target=""/>
              <property ref="swipe_dy" target=""/>
          </gesture_event>
        </update>
    </mapping>
</Gesture>
gestures/touch/simple/geometric/simple-chord/row.txt · Last modified: 2015/10/09 16:31 by paul