Override defaults with $.fn.draggable.defaults.
Create a draggable element from markup.
Create a draggable element using javascript.
字段摘要 | |
---|---|
String |
axis
Defines the axis which the dragged elements moves on, available value is 'v' or 'h', when set to null will move across 'v' and 'h' direction. |
String |
cursor
The css cursor when dragging. |
String |
deltaX
The dragged element position x corresponding to current cursor |
String |
deltaY
The dragged element position y corresponding to current cursor |
String |
disabled
True to stop draggable. |
String |
edge
The drag width in which can start draggable. |
String |
generateDiv
是否先生成一个DIV。 |
String |
handle
The handle that start the draggable. |
String |
id
对应的div的id属性值。 |
String |
label
|
String |
name
|
String |
otherAttributes
一些其他属性,如: |
String |
proxy
A proxy element to be used when dragging, when set to 'clone', a clone element is used as proxy. If a function is specified, it must return a jQuery object. |
String |
revert
If set to true, the element will return to its start position when dragging stops. |
String |
style
html的style属性,如: |
方法摘要 | |
---|---|
|
getClass
返回EsayUI的class名称,一般是easyui-draggable,其中draggable是事物名的小写。 |
|
getHtmlTag
一般EasyUi事物对应的html标签是div,如果有其他的,比如form中的元素,那么可能是input,则需要重载此方法。 |
|
toHtml
|
|
toJavaScriptCode
|
子事物摘要 | |
---|---|
|
ExtJs
EXtjs组件。 |
|
FormLayout(表单布局)
表单布局使用Table布局,表单布局认为子事物都含有标签和输入,因此表单布局默认。 |
|
HtmlTag
可以自定义简单的HTML标签。 |
|
JavaScript
作用 |
|
XWRemoteSupport
提供打开窗口、打开TabItem等功能。 |
|
button(按钮)
|
|
checkBox(复选框)
|
|
code(代码)
可以直接编辑HTML的地方。 |
|
comboBox(下拉框)
|
|
dateInput(日期输入)
|
|
diagram(图表)
|
|
div
简单的div标签。 |
|
form(表单)
|
|
grid(数据格)
|
|
hidden(隐藏输入)
隐藏字段。 |
|
htmlCode(HTML代码)
通过XWorker内置的HTML编辑器编写HTML代码。 |
|
label(标签)
|
|
list(列表)
|
|
menu(菜单)
|
|
onBeforeDrag
Fires before dragging, return false to cancel this dragging. |
|
onDrag
Fires during dragging. Return false will not do dragging actually. |
|
onStartDrag
Fires when the target object start dragging. |
|
onStopDrag
Fires when the dragging stops. |
|
password(密码框)
|
|
proxy
A proxy element to be used when dragging, when set to 'clone', a clone element is used as proxy. If a function is specified, it must return a jQuery object. |
|
radioButton(选项按钮)
|
|
span
简单的span标签。 |
|
table(表格)
|
|
textArea(文本区)
|
|
textField(文本框)
|
|
yui-ext
|
字段详细信息 |
---|
Defines the axis which the dragged elements moves on, available value is 'v' or 'h', when set to null will move across 'v' and 'h' direction.
The css cursor when dragging.
The dragged element position x corresponding to current cursor
The dragged element position y corresponding to current cursor
True to stop draggable.
The drag width in which can start draggable.
是否先生成一个DIV。
The handle that start the draggable.
对应的div的id属性值。
一些其他属性,如:
onClick="javascript:void(0)" align="left"
A proxy element to be used when dragging, when set to 'clone', a clone element is used as proxy. If a function is specified, it must return a jQuery object.
The example below shows how to create a simple proxy object.
$('.dragitem').draggable({ proxy: function(source){ var p = $('<div style="border:1px solid #ccc;width:80px"></div>'); p.html($(source).html()).appendTo('body'); return p; } });
If set to true, the element will return to its start position when dragging stops.
html的style属性,如:
width:100px;height:100px;
方法详细信息 |
---|
返回EsayUI的class名称,一般是easyui-draggable,其中draggable是事物名的小写。
一般EasyUi事物对应的html标签是div,如果有其他的,比如form中的元素,那么可能是input,则需要重载此方法。
子事物详细信息 |
---|
EXtjs组件。
表单布局使用Table布局,表单布局认为子事物都含有标签和输入,因此表单布局默认。
可以自定义简单的HTML标签。
作用
用于生成JavaScript代码片段,所有能够生成JavaScript代码片段的都应注册到此子事物下。
JavaScript注册
所有能够生成 JavaScript代码的事物都应该注册到本事物下。
重载toHtml方法
如果一个事物继承了JavaScript并且只是用于生成JavaScript代码的,那么应该重载toHtml方法,返回在toHtml方法里返回null,可以使用NOOP动作。
提供打开窗口、打开TabItem等功能。
可以直接编辑HTML的地方。
简单的div标签。
通过XWorker内置的HTML编辑器编写HTML代码。
Fires before dragging, return false to cancel this dragging.
Fires during dragging. Return false will not do dragging actually.
Fires when the target object start dragging.
Fires when the dragging stops.
A proxy element to be used when dragging, when set to 'clone', a clone element is used as proxy. If a function is specified, it must return a jQuery object.
The example below shows how to create a simple proxy object.
$('.dragitem').draggable({ proxy: function(source){ var p = $('<div style="border:1px solid #ccc;width:80px"></div>'); p.html($(source).html()).appendTo('body'); return p; } });
简单的span标签。