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 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 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 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 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 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
Created October 11, 2013 21:03
Quadtree 3

This example demonstrates how to take the size of objects into account when selecting objects efficiently with a quadtree. Selected objects are shown in red, visited but not selected objects are shown in yellow. The efficiency depends on the biggest width and biggest height among all object. It is assumed that all objects are rectangle-shaped.

Example series:

Based on Mike Bostock's quadtree example.

@eweitnauer
eweitnauer / README.md
Last active December 25, 2015 07:49
Quadtree 2

This example demonstrates how to take the size of objects into account when selecting objects efficiently with a quadtree. Selected objects are shown in red, visited but not selected objects are shown in yellow. The efficiency depends on the size of the biggest object. It is assumed that the objects are square-shaped.

Example series:

Based on Mike Bostock's quadtree example.

@eweitnauer
eweitnauer / README.md
Last active December 25, 2015 07:39 — forked from mbostock/README.md
Quadtree 1

This example demonstrates how to take the size of objects into account when selecting objects efficiently with a quadtree. Selected objects are shown in red, visited but not selected objects are shown in yellow. The efficiency depends on the size of the objects. It is assumed that all objects are square-shaped and have the same size.

Example series:

Based on Mike Bostock's quadtree example.

@eweitnauer
eweitnauer / README.md
Last active February 12, 2018 15:53
SVG Semantic Zooming
@eweitnauer
eweitnauer / README.md
Last active December 25, 2015 07:29
SVG Geometric Zooming