From c5bcf59428d06bb38554671e04bcf2352172b7d8 Mon Sep 17 00:00:00 2001 From: elemoine Date: Fri, 28 Sep 2012 07:25:19 -0700 Subject: [PATCH] Destroyed Interaction (markdown) --- Interaction.md | 55 -------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 Interaction.md diff --git a/Interaction.md b/Interaction.md deleted file mode 100644 index 04701cf..0000000 --- a/Interaction.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interaction - -## Double Click Zoom - -* Apply a zoom factor -* Apply resolution constraint for each double click -* Is `zoomFactor` an option/property of the interaction or of the map? -* Double click handler: - ``` - var options = {constrain: true, animate: false}; - map.moveTo(center, map.getResolution() * zoomFactor, options); - ``` - -## Pinch Zoom - -* No resolution constraint while pinching -* Use CSS3 transforms? -* Apply resolution constraint when releasing mouse to determine the final resolution -* Animate to final resolution -* Pinching handler: - ``` - var options = {constrain: false, animate: false}; - map.moveTo(center, map.getResolution() * scale, options); - ``` - Done pinching handler: - ``` - var options = {constrain: true, animate: true}; - map.moveTo(center, map.getResolution() * scale, options); - ``` - -## (Alt) Drag Rotate: - -* No rotation constraint while rotating -* Apply rotation constraint when releasing mouse to determine the final angle -* Animate to final angle -* Rotating handler: - ``` - var options = {constrain: false, animate: false}; - map.rotate(angle, options); - ``` - Done rotating handler: - ``` - var options = {constrain: true, animate: true}; - map.rotate(angle, options); - ``` - -## Mouse Wheel Zoom: - -* Apply resolution constraint as the user scrolls -* Mouse wheel handler: - ``` - var options = {constrain: true, animate: false}; - map.zoomTo(center, map.getResolution() * scale, options); - ``` -