User Tools

Site Tools


gestures:touch:simple:spatial:drag-move:n-drag

N-Drag

(Touch → Spatial → Drag/Move → Simple N Point Drag Gesture “N-Drag”)



The N-Drag gesture is designed to provide object drag functionality using any number of touch points. It is considered to be one of the three fundamental object manipulation gestures.

This gesture can be activated by any number of touch points between 1 and 10. When a touch down is recognized on a touch object the position of the touch point is tracked. This change in the position of the touch point is mapped directly to the position of the touch object.

<Gesture id="n-drag" type="drag">
    <match>
        <action>
            <initial>
                <cluster point_number="0" point_number_min="1" point_number_max="10"/>
            </initial>
        </action>
    </match>       
    <analysis>
        <algorithm class="kinemetric" type="continuous">
            <library module="drag"/>
            <returns>
                <property id="drag_dx" result="dx"/>
                <property id="drag_dy" result="dy"/>
            </returns>
        </algorithm>
    </analysis>    
    <mapping>
        <update dispatch_type="continuous">
            <gesture_event type="drag">
                <property ref="drag_dx" target="x"/>
                <property ref="drag_dy" target="y"/>
            </gesture_event>
        </update>
    </mapping>
</Gesture>
gestures/touch/simple/spatial/drag-move/n-drag.txt · Last modified: 2019/01/29 19:07 (external edit)