<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js">/*
* These classes are derivatives of the similarly named classes in the YUI Library.
* The original license:
* Copyright (c) 2006, Yahoo! Inc. All rights reserved.
* Code licensed under the BSD License:
* http://developer.yahoo.net/yui/license.txt
*/
(function() {
var Event=Ext.EventManager;
var Dom=Ext.lib.Dom;
<span id='Ext-dd-DragDrop-method-constructor'><span id='Ext-dd-DragDrop'>/**
</span></span> * @class Ext.dd.DragDrop
* Defines the interface and base operation of items that that can be
* dragged or can be drop targets. It was designed to be extended, overriding
* the event handlers for startDrag, onDrag, onDragOver and onDragOut.
* Up to three html elements can be associated with a DragDrop instance:
* <ul>
* <li>linked element: the element that is passed into the constructor.
* This is the element which defines the boundaries for interaction with
* other DragDrop objects.</li>
* <li>handle element(s): The drag operation only occurs if the element that
* was clicked matches a handle element. By default this is the linked
* element, but there are times that you will want only a portion of the
* linked element to initiate the drag operation, and the setHandleElId()
* method provides a way to define this.</li>
* <li>drag element: this represents the element that would be moved along
* with the cursor during a drag operation. By default, this is the linked
* element itself as in {@link Ext.dd.DD}. setDragElId() lets you define
* a separate element that would be moved, as in {@link Ext.dd.DDProxy}.
* </li>
* </ul>
* This class should not be instantiated until the onload event to ensure that
* the associated elements are available.
* The following would define a DragDrop obj that would interact with any
* other DragDrop obj in the "group1" group:
* <pre>
* dd = new Ext.dd.DragDrop("div1", "group1");
* </pre>
* Since none of the event handlers have been implemented, nothing would
* actually happen if you were to run the code above. Normally you would
* override this class or one of the default implementations, but you can
* also override the methods you want on an instance of the class...
* <pre>
* dd.onDragDrop = function(e, id) {
* &nbsp;&nbsp;alert("dd was dropped on " + id);
* }
* </pre>
* @constructor
* @param {String} id of the element that is linked to this instance
* @param {String} sGroup the group of related DragDrop objects
* @param {object} config an object containing configurable attributes
* Valid properties for DragDrop:
* padding, isTarget, maintainOffset, primaryButtonOnly
*/
Ext.dd.DragDrop = function(id, sGroup, config) {
if(id) {
this.init(id, sGroup, config);
}
};
Ext.dd.DragDrop.prototype = {
<span id='Ext-dd-DragDrop-property-ignoreSelf'> /**
</span> * Set to false to enable a DragDrop object to fire drag events while dragging
* over its own Element. Defaults to true - DragDrop objects do not by default
* fire drag events to themselves.
* @property ignoreSelf
* @type Boolean
*/
<span id='Ext-dd-DragDrop-property-id'> /**
</span> * The id of the element associated with this object. This is what we
* refer to as the "linked element" because the size and position of
* this element is used to determine when the drag and drop objects have
* interacted.
* @property id
* @type String
*/
id: null,
<span id='Ext-dd-DragDrop-property-config'> /**
</span> * Configuration attributes passed into the constructor
* @property config
* @type object
*/
config: null,
<span id='Ext-dd-DragDrop-property-dragElId'> /**
</span> * The id of the element that will be dragged. By default this is same
* as the linked element, but could be changed to another element. Ex:
* Ext.dd.DDProxy
* @property dragElId
* @type String
* @private
*/
dragElId: null,
<span id='Ext-dd-DragDrop-property-handleElId'> /**
</span> * The ID of the element that initiates the drag operation. By default
* this is the linked element, but could be changed to be a child of this
* element. This lets us do things like only starting the drag when the
* header element within the linked html element is clicked.
* @property handleElId
* @type String
* @private
*/
handleElId: null,
<span id='Ext-dd-DragDrop-property-invalidHandleTypes'> /**
</span> * An object who's property names identify HTML tags to be considered invalid as drag handles.
* A non-null property value identifies the tag as invalid. Defaults to the
* following value which prevents drag operations from being initiated by &lt;a> elements:<pre><code>
{
A: "A"
}</code></pre>
* @property invalidHandleTypes
* @type Object
*/
invalidHandleTypes: null,
<span id='Ext-dd-DragDrop-property-invalidHandleIds'> /**
</span> * An object who's property names identify the IDs of elements to be considered invalid as drag handles.
* A non-null property value identifies the ID as invalid. For example, to prevent
* dragging from being initiated on element ID "foo", use:<pre><code>
{
foo: true
}</code></pre>
* @property invalidHandleIds
* @type Object
*/
invalidHandleIds: null,
<span id='Ext-dd-DragDrop-property-invalidHandleClasses'> /**
</span> * An Array of CSS class names for elements to be considered in valid as drag handles.
* @property invalidHandleClasses
* @type Array
*/
invalidHandleClasses: null,
<span id='Ext-dd-DragDrop-property-startPageX'> /**
</span> * The linked element's absolute X position at the time the drag was
* started
* @property startPageX
* @type int
* @private
*/
startPageX: 0,
<span id='Ext-dd-DragDrop-property-startPageY'> /**
</span> * The linked element's absolute X position at the time the drag was
* started
* @property startPageY
* @type int
* @private
*/
startPageY: 0,
<span id='Ext-dd-DragDrop-property-groups'> /**
</span> * The group defines a logical collection of DragDrop objects that are
* related. Instances only get events when interacting with other
* DragDrop object in the same group. This lets us define multiple
* groups using a single DragDrop subclass if we want.
* @property groups
* @type object An object in the format {'group1':true, 'group2':true}
*/
groups: null,
<span id='Ext-dd-DragDrop-property-locked'> /**
</span> * Individual drag/drop instances can be locked. This will prevent
* onmousedown start drag.
* @property locked
* @type boolean
* @private
*/
locked: false,
<span id='Ext-dd-DragDrop-method-lock'> /**
</span> * Lock this instance
* @method lock
*/
lock: function() {
this.locked = true;
},
<span id='Ext-dd-DragDrop-property-moveOnly'> /**
</span> * When set to true, other DD objects in cooperating DDGroups do not receive
* notificati
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
安装Spket插件的ext.jsb2文件 (3189个子文件)
app-88de2e4b4aaefeb72bd4003a88ad5c26.css 290KB
ext-all.css 114KB
ext-all-notheme.css 99KB
xtheme-access.css 41KB
xtheme-blue.css 39KB
xtheme-gray.css 38KB
yourtheme.css 38KB
silk.css 18KB
calendar.css 18KB
ux-all.css 17KB
desktop.css 14KB
form.css 12KB
grid.css 12KB
extjs.css 9KB
button.css 8KB
panel.css 8KB
tabs.css 8KB
grid.css 7KB
grid.css 7KB
grid.css 7KB
panel-reset.css 7KB
GroupTab.css 6KB
core.css 6KB
toolbar.css 6KB
feed-viewer.css 6KB
feed-viewer.css 5KB
layout.css 5KB
date-picker.css 5KB
tree.css 5KB
feed-viewer-access.css 5KB
menu.css 4KB
tree.css 4KB
form.css 4KB
window.css 4KB
tree.css 4KB
tree.css 4KB
button.css 4KB
toolbar.css 4KB
tasks.css 3KB
tabs.css 3KB
date-picker.css 3KB
editor.css 3KB
tabs.css 3KB
resizable.css 3KB
date-picker.css 3KB
date-picker.css 3KB
statusbar.css 3KB
form.css 3KB
tabs.css 3KB
forum.css 3KB
toolbar.css 3KB
toolbar.css 3KB
qtips.css 3KB
form.css 3KB
layout-browser.css 3KB
button.css 3KB
button.css 3KB
restful.css 3KB
img-org.css 3KB
panel.css 2KB
panel.css 2KB
slider.css 2KB
panel.css 2KB
window.css 2KB
menu.css 2KB
chooser.css 2KB
window.css 2KB
window.css 2KB
core.css 2KB
resizable.css 2KB
resizable.css 2KB
core.css 2KB
resizable.css 2KB
menu.css 2KB
list-view.css 2KB
core.css 2KB
RowEditor.css 2KB
box.css 2KB
box.css 2KB
box.css 2KB
box.css 2KB
menu.css 2KB
examples.css 2KB
organizer.css 2KB
Spinner.css 2KB
toolbars.css 2KB
bubble.css 2KB
ColumnNodeUI.css 2KB
layout.css 2KB
layout.css 2KB
layout.css 2KB
pivotgrid.css 2KB
qtips.css 2KB
qtips.css 2KB
qtips.css 2KB
grid-examples.css 2KB
animated-dataview.css 2KB
GridFilters.css 2KB
data-view.css 2KB
dialog.css 2KB
共 3189 条
- 1
- 2
- 3
- 4
- 5
- 6
- 32
资源评论
喜羊羊同学o
- 粉丝: 2
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功