Skip to content

Instantly share code, notes, and snippets.

View eweitnauer's full-sized avatar

Erik Weitnauer eweitnauer

  • Bielefeld, Germany
View GitHub Profile
@eweitnauer
eweitnauer / Readme.md
Last active December 25, 2015 17:19
Direct Immediate Dragging

Series of examples:

The examples explore different dragging implementations along two dimensions: First, direct vs. indirect where in the former case the dragged element is determined automatically by the DOM event, while in the latter case, the hit tests on the elements are done manually. This allows, e.g., for moving several elements at once, or moving elements that are not under the mouse when the user started dragging. The second dimension is immediate position update as new mouse positions come in as dragging events or positions updates using transitions. The latter may give the feeling of a slightly smoother interaction.

@eweitnauer
eweitnauer / Readme.md
Last active December 25, 2015 17:19
Indirect Immediate Dragging

Series of examples:

The examples explore different dragging implementations along two dimensions: First, direct vs. indirect where in the former case the dragged element is determined automatically by the DOM event, while in the latter case, the hit tests on the elements are done manually. This allows, e.g., for moving several elements at once, or moving elements that are not under the mouse when the user started dragging. The second dimension is immediate position update as new mouse positions come in as dragging events or positions updates using transitions. The latter may give the feeling of a slightly smoother interaction.

@eweitnauer
eweitnauer / Readme.md
Last active December 25, 2015 17:19
Direct Animated Dragging

Series of examples:

The examples explore different dragging implementations along two dimensions: First, direct vs. indirect where in the former case the dragged element is determined automatically by the DOM event, while in the latter case, the hit tests on the elements are done manually. This allows, e.g., for moving several elements at once, or moving elements that are not under the mouse when the user started dragging. The second dimension is immediate position update as new mouse positions come in as dragging events or positions updates using transitions. The latter may give the feeling of a slightly smoother interaction.

@eweitnauer
eweitnauer / Readme.md
Last active December 25, 2015 17:19
Indirect Animated Dragging

Series of examples:

The examples explore different dragging implementations along two dimensions: First, direct vs. indirect where in the former case the dragged element is determined automatically by the DOM event, while in the latter case, the hit tests on the elements are done manually. This allows, e.g., for moving several elements at once, or moving elements that are not under the mouse when the user started dragging. The second dimension is immediate position update as new mouse positions come in as dragging events or positions updates using transitions. The latter may give the feeling of a slightly smoother interaction.

@eweitnauer
eweitnauer / README.md
Last active December 26, 2015 10:29
Transform Behavior

Translate the view by dragging with the mouse or one finger. Rotate, scale and translate the view using two fingers at once.

This example is based on the transform behavior, which is in turn based on the mtouch events.

Mtouch events allows treating mouse events and touch events the same way. It supports the events "touch", "release", "tap", "dbltap", "hold", "drag" and "mdrag". The "mdrag" event is dispatched per mousemove/touchmove DOM event and can contain multiple changed touches at once, while all the other events are dispatched per touch.

@eweitnauer
eweitnauer / README.md
Last active September 23, 2019 16:05
mtouch Tap

Demonstration of the basic mtouch_events event types.

mtouch_events allows treating mouse events and touch events the same way. It supports the events "touch", "release", "tap", "dbltap", "hold", "drag" and "mdrag". The "mdrag" event is dispatched per mousemove/touchmove DOM event and can contain multiple changed touches at once, while all the other events are dispatched per touch.

@eweitnauer
eweitnauer / README.md
Created October 24, 2013 20:24
mtouch Multi Drag

Performant dragging of multiple elements using mtouch_events. Hit-testing is done manually, so you can start dragging anywhere and you'll pick up the first elements you pass over. If elements overlap, you can also move several at once. Works fine even with 10 fingers at once.

@eweitnauer
eweitnauer / README.md
Created October 24, 2013 20:27
Hold and Tap

Hold any circle and tap another one to connect / disconnect both.

@eweitnauer
eweitnauer / README.md
Created October 24, 2013 20:31
Drag All on Line

Drag multiple circles at once using two fingers. The circles on the line connecting your fingers when you start dragging are selected.

@eweitnauer
eweitnauer / README.md
Created October 24, 2013 20:32
Drag All in Rectangle

Drag multiple circles at once using two fingers. The circles inside the rectangle spanned by your fingers when you start dragging are selected.