From 3530c1f3f8fe11e16451ef1cb49ae9f63a1b3b59 Mon Sep 17 00:00:00 2001 From: Maggie Costello Wachs Date: Thu, 15 Jan 2009 20:17:49 +0000 Subject: [PATCH] reorganized draggable demos and combined a few into new pages --- demos/draggable/constrain-movement.html | 45 ++++++++++++++++ demos/draggable/handle.html | 2 + demos/draggable/index.html | 44 ++++++++++------ demos/draggable/snap-to.html | 70 +++++++++++++++++++++++++ demos/draggable/visual-feedback.html | 54 +++++++++++++++++++ 5 files changed, 200 insertions(+), 15 deletions(-) create mode 100644 demos/draggable/constrain-movement.html create mode 100644 demos/draggable/snap-to.html create mode 100644 demos/draggable/visual-feedback.html diff --git a/demos/draggable/constrain-movement.html b/demos/draggable/constrain-movement.html new file mode 100644 index 000000000..fbfea8009 --- /dev/null +++ b/demos/draggable/constrain-movement.html @@ -0,0 +1,45 @@ + + + + jQuery UI Draggable - Axis Demo + + + + + + + + + +
+ +
+

I can be dragged only vertically

+
+ +
+

I can be dragged only horizontally

+
+ + + +
+ +
+ +

+Define the boundaries of the draggable area. Set the axis option to limit the draggable's path to the x- or y-axis. Or use the containment option to specify a parent DOM element or a jQuery selector, like 'document.' +

+ +
+ + diff --git a/demos/draggable/handle.html b/demos/draggable/handle.html index 9acfa2a7d..ea53c09b8 100644 --- a/demos/draggable/handle.html +++ b/demos/draggable/handle.html @@ -24,6 +24,8 @@

I can be dragged only by this handle

+ +
diff --git a/demos/draggable/index.html b/demos/draggable/index.html index ec47a7822..d4c927193 100644 --- a/demos/draggable/index.html +++ b/demos/draggable/index.html @@ -9,24 +9,38 @@ + + diff --git a/demos/draggable/snap-to.html b/demos/draggable/snap-to.html new file mode 100644 index 000000000..0f9c9a91d --- /dev/null +++ b/demos/draggable/snap-to.html @@ -0,0 +1,70 @@ + + + + jQuery UI Draggable - Snap Demo + + + + + + + + + +
+ +
+

I'm a snap target

+
+ +
+ +
+

Default (snap: true), snaps to all other draggable elements

+
+ +
+

I only snap to the big box

+
+ +
+

I only snap to the outer edges of the bix box

+
+ +
+

I only snap to the inner edges of the big box

+
+ +
+

I also snap to the big box but I'm very sticky because I have a high tolerance

+
+ + + + +
+ +
+ +

+ +

+ +
+ + + + + diff --git a/demos/draggable/visual-feedback.html b/demos/draggable/visual-feedback.html new file mode 100644 index 000000000..333560567 --- /dev/null +++ b/demos/draggable/visual-feedback.html @@ -0,0 +1,54 @@ + + + + jQuery UI Draggable - Helper Demo + + + + + + + + + +
+ +
+

Original

+
+ +
+

Clone

+
+ +
+

Custom helper (in combination with cursorAt)

+
+ + + +
+ +
+ +

+ +

+ +
+ +