Method called as we start Drag/drop
function DragStart () {
var e;
e = window.event.srcElement;
if (e.tagname!= "label")
return false;
Dragelement = e.parentelement;
}
Called as we mouse over-note that there was special handling for DragOver code
As DragLeave doesn ' t track the toelement/fromelement as Mouseover/mouseout does
function DragOver () {
if (window.event.srcElement.tagName!= "TreeItem")
Return
Called when drag is Ended-always
function Dragend () {
if (currover) {
CurrOver.style.borderTopColor = "";
}
}
called on Drop
function DragDrop () {
if (currover) {
CurrOver.style.borderTopColor = "";
}
t = currover;
T.parentelement.insertbefore (dragelement, T);
}
needed to select items so they can be dragged
Drag drop only supported on selection and images
function Preselect () {
var e;
e = window.event.srcElement;
if (e.tagname!= "label") {
Return
}
R = Document.body.createTextRange ();
R.movetoelementtext (e);
R.select ();
Window.event.cancelBubble = true;
}
Beginning of Expand/collapse Code
Called to handle document click, starts toggling
function Click () {
if (window.event.srcElement.tagName!= "label") {
Return
}
if (Window.event.srcElement.parentElement.children.length > 1) {
Togglestate (window.event.srcElement.parentElement);
}
}
Toggles expanding/collapse state of Element-does Setup
function Togglestate (e) {
E.oheight = E.scrollheight + 2;
E.style.posheight = E.offsetheight;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.