NativeDD_wev8.js
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Ext JS Library 0.20
* Copyright(c) 2006-2008, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
/**
* @class Ext.air.DragType
*
* Drag drop type constants
*
* @singleton
*/
Ext.air.DragType = {
/**
* Constant for text data
*/
TEXT : 'text/plain',
/**
* Constant for html data
*/
HTML : 'text/html',
/**
* Constant for url data
*/
URL : 'text/uri-list',
/**
* Constant for bitmap data
*/
BITMAP : 'image/x-vnd.adobe.air.bitmap',
/**
* Constant for file list data
*/
FILES : 'application/x-vnd.adobe.air.file-list'
};
// workaround for DD dataTransfer Clipboard not having hasFormat
Ext.apply(Ext.EventObjectImpl.prototype, {
hasFormat : function(format){
if (this.browserEvent.dataTransfer) {
for (var i = 0, len = this.browserEvent.dataTransfer.types.length; i < len; i++) {
if(this.browserEvent.dataTransfer.types[i] == format) {
return true;
}
}
}
return false;
},
getData : function(type){
return this.browserEvent.dataTransfer.getData(type);
}
});