User Tools

Site Tools


gestures:touch:simple:geometric:simple-chord:column

Column Gesture (Chords)

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

The 3 finger Column Hold Gesture

<Gesture id="3-column-hold" type="hold">
    <match>
        <action>
            <initial>
                <point event_duration_min="200" translation_max="2"/>
                <cluster point_number="3" orientation="vertical" separation_y_max="10" separation_x_max="150"/>
            </initial>
        </action>
    </match>       
    <analysis>
        <algorithm>
            <library module="column"/>
            <returns>
                <property id="column_x" result="x"/>
                <property id="column_y" result="y"/>
                <property id="column_n" result="n"/>
            </returns>
        </algorithm>
    </analysis>    
    <mapping>
        <update dispatch_type="discrete" dispatch_reset="cluster_remove">
            <gesture_event type="hold">
                <property ref="column_x"/>
                <property ref="column_y"/>
                <property ref="column_n"/>
            </gesture_event>
        </update>
    </mapping>
</Gesture>

The 2 finger Column Swipe Gesture

<Gesture id="3-column-swipe" type="swipe">
    <match>
        <action>
            <initial>
                <cluster point_number="3" orientation="vertical" separation_y_max="10" separation_x_max="150" acceleration_max="0.5"/>
                <event touch_event="touchEnd"/>
            </initial>
        </action>
    </match>       
    <analysis>
        <algorithm class="kinemetric" type="discrete">
            <library module="column"/>
            <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/column.txt · Last modified: 2015/10/09 16:31 by paul