mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 10:38:26 +00:00
chore(dom) add " "
This commit is contained in:
parent
aff299ed1b
commit
ae5a50d58f
1 changed files with 30 additions and 30 deletions
|
|
@ -1113,38 +1113,38 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
return this;
|
||||
};
|
||||
|
||||
/*
|
||||
* set current file by position
|
||||
*
|
||||
* @param layer - element
|
||||
* @param - position {x, y}
|
||||
*/
|
||||
this.getCurrentByPosition = function(position) {
|
||||
var element, tag, isChild,
|
||||
x = position.x,
|
||||
y = position.y;
|
||||
|
||||
element = document.elementFromPoint(x, y),
|
||||
tag = element.tagName;
|
||||
|
||||
isChild = Util.strCmp(tag, ['A', 'SPAN', 'LI']);
|
||||
|
||||
if (!isChild) {
|
||||
element = null;
|
||||
} else {
|
||||
switch (tag) {
|
||||
case 'A':
|
||||
element = element.parentElement.parentElement;
|
||||
break;
|
||||
/*
|
||||
* set current file by position
|
||||
*
|
||||
* @param layer - element
|
||||
* @param - position {x, y}
|
||||
*/
|
||||
this.getCurrentByPosition = function(position) {
|
||||
var element, tag, isChild,
|
||||
x = position.x,
|
||||
y = position.y;
|
||||
|
||||
case 'SPAN':
|
||||
element = element.parentElement;
|
||||
break;
|
||||
element = document.elementFromPoint(x, y),
|
||||
tag = element.tagName;
|
||||
|
||||
isChild = Util.strCmp(tag, ['A', 'SPAN', 'LI']);
|
||||
|
||||
if (!isChild) {
|
||||
element = null;
|
||||
} else {
|
||||
switch (tag) {
|
||||
case 'A':
|
||||
element = element.parentElement.parentElement;
|
||||
break;
|
||||
|
||||
case 'SPAN':
|
||||
element = element.parentElement;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
/**
|
||||
* select current file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue