Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draggable:Resizable:Selectable:Sortable: Allow using a Function as cancel … #369

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion entries/draggable.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@
<option name="axis" type="String" default="false" example-value='"x"'>
<desc>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: <code>"x"</code>, <code>"y"</code>.</desc>
</option>
<option name="cancel" type="Selector" default='"input,textarea,button,select,option"' example-value='".title"'>
<option name="cancel" default='"input,textarea,button,select,option"' example-value='".title"'>
<desc>Prevents dragging from starting on specified elements.</desc>
<type name="Selector">
<desc>A selector specifying elements for which dragging is canceled.</desc>
</type>
<type name="Function">
<desc>A function that can return true to cancel dragging. The function receives the event object.</desc>
</type>
</option>
<option name="classes" type="Object" default="{}">
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
Expand Down
8 changes: 7 additions & 1 deletion entries/mouse.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
</ul>
</longdesc>
<options>
<option name="cancel" type="Selector" default='"input,textarea,button,select,option"' example-value='".title"'>
<option name="cancel" default='"input,textarea,button,select,option"' example-value='".title"'>
<desc>Prevents interactions from starting on specified elements.</desc>
<type name="Selector">
<desc>A selector specifying elements for which interactions are canceled.</desc>
</type>
<type name="Function">
<desc>A function that can return true to cancel interactions. The function receives the event object.</desc>
</type>
</option>
<option name="delay" type="Number" default="0" example-value="300">
<deprecated>1.12</deprecated>
Expand Down
8 changes: 7 additions & 1 deletion entries/resizable.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@
<option name="autoHide" type="Boolean" default="false" example-value='true'>
<desc>Whether the handles should hide when the user is not hovering over the element.</desc>
</option>
<option name="cancel" type="Selector" default='"input,textarea,button,select,option"' example-value='".cancel"'>
<option name="cancel" default='"input,textarea,button,select,option"' example-value='".cancel"'>
<desc>Prevents resizing from starting on specified elements.</desc>
<type name="Selector">
<desc>A selector specifying elements for which resizing is canceled.</desc>
</type>
<type name="Function">
<desc>A function that can return true to cancel resizing. The function receives the event object.</desc>
</type>
</option>
<option name="containment" default="false" example-value='"parent"'>
<desc>Constrains resizing to within the bounds of the specified element or region.</desc>
Expand Down
8 changes: 7 additions & 1 deletion entries/selectable.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@
<option name="autoRefresh" type="Boolean" default="true" example-value='false'>
<desc>This determines whether to refresh (recalculate) the position and size of each selectee at the beginning of each select operation. If you have many items, you may want to set this to false and call the <a href="#method-refresh"><code>refresh()</code></a> method manually.</desc>
</option>
<option name="cancel" type="Selector" default='"input,textarea,button,select,option"' example-value='"a,.cancel"'>
<option name="cancel" default='"input,textarea,button,select,option"' example-value='"a,.cancel"'>
<desc>Prevents selecting if you start on elements matching the selector.</desc>
<type name="Selector">
<desc>A selector specifying elements for which selecting is canceled.</desc>
</type>
<type name="Function">
<desc>A function that can return true to cancel selecting. The function receives the event object.</desc>
</type>
</option>
<option name="classes" type="Object" default="{}">
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
Expand Down
8 changes: 7 additions & 1 deletion entries/sortable.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@
<option name="axis" type="String" default='false' example-value='"x"'>
<desc>If defined, the items can be dragged only horizontally or vertically. Possible values: <code>"x"</code>, <code>"y"</code>.</desc>
</option>
<option name="cancel" type="Selector" default='"input,textarea,button,select,option"' example-value='"a,button"'>
<option name="cancel" default='"input,textarea,button,select,option"' example-value='"a,button"'>
<desc>Prevents sorting if you start on elements matching the selector.</desc>
<type name="Selector">
<desc>A selector specifying elements for which sorting is canceled.</desc>
</type>
<type name="Function">
<desc>A function that can return true to cancel sorting. The function receives the event object.</desc>
</type>
</option>
<option name="classes" type="Object" default="{}">
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
Expand Down