-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTreeView.js
68 lines (61 loc) · 2.22 KB
/
TreeView.js
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
61
62
63
64
65
66
67
68
Ext.tree.View.addMembers({
providedStore: null,
initComponent: function () {
var me = this,
treeStore = me.panel.getStore();
me.animate = false;
// BEGIN OF MODIFICATIONS
me.store = me.providedStore || new Ext.data.NodeStore({
treeStore: treeStore,
recursive: true,
rootVisible: me.rootVisible
});
me.store.on({
beforeexpand: me.onBeforeExpand,
expand: me.onExpand,
beforecollapse: me.onBeforeCollapse,
collapse: me.onCollapse,
write: me.onStoreWrite,
datachanged: me.onStoreDataChanged,
scope: me
});
if (me.node && !me.store.node) {
me.setRootNode(me.node);
}
// EOF MODIFICATIONS
me.animQueue = {};
me.animWraps = {};
me.addEvents(
/**
* @event afteritemexpand
* Fires after an item has been visually expanded and is visible in the tree.
* @param {Ext.data.NodeInterface} node The node that was expanded
* @param {Number} index The index of the node
* @param {HTMLElement} item The HTML element for the node that was expanded
*/
'afteritemexpand',
/**
* @event afteritemcollapse
* Fires after an item has been visually collapsed and is no longer visible in the tree.
* @param {Ext.data.NodeInterface} node The node that was collapsed
* @param {Number} index The index of the node
* @param {HTMLElement} item The HTML element for the node that was collapsed
*/
'afteritemcollapse'
);
me.callParent(arguments);
me.on({
element: 'el',
scope: me,
delegate: me.expanderSelector,
mouseover: me.onExpanderMouseOver,
mouseout: me.onExpanderMouseOut
});
me.on({
element: 'el',
scope: me,
delegate: me.checkboxSelector,
click: me.onCheckboxChange
});
}
});