mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
enteredCounter replace dragEnterContainerAmount
This commit is contained in:
@@ -71,7 +71,7 @@ class DirentListView extends React.Component {
|
|||||||
isListDropTipShow: false,
|
isListDropTipShow: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.dragEnterContainerAmount = 0;
|
this.enteredCounter = 0;
|
||||||
this.isRepoOwner = props.currentRepoInfo.owner_email === username;
|
this.isRepoOwner = props.currentRepoInfo.owner_email === username;
|
||||||
this.isAdmin = props.currentRepoInfo.is_admin;
|
this.isAdmin = props.currentRepoInfo.is_admin;
|
||||||
this.repoEncrypted = props.currentRepoInfo.encrypted;
|
this.repoEncrypted = props.currentRepoInfo.encrypted;
|
||||||
@@ -541,8 +541,8 @@ class DirentListView extends React.Component {
|
|||||||
if (Utils.isIEBrower()) {
|
if (Utils.isIEBrower()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.dragEnterContainerAmount++;
|
this.enteredCounter++;
|
||||||
if (this.dragEnterContainerAmount !== 0) {
|
if (this.enteredCounter !== 0) {
|
||||||
this.setState({isListDropTipShow: true});
|
this.setState({isListDropTipShow: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -559,8 +559,8 @@ class DirentListView extends React.Component {
|
|||||||
if (Utils.isIEBrower()) {
|
if (Utils.isIEBrower()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.dragEnterContainerAmount--;
|
this.enteredCounter--;
|
||||||
if (this.dragEnterContainerAmount === 0) {
|
if (this.enteredCounter === 0) {
|
||||||
this.setState({isListDropTipShow: false});
|
this.setState({isListDropTipShow: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -570,7 +570,7 @@ class DirentListView extends React.Component {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
e.persist();
|
e.persist();
|
||||||
this.dragEnterContainerAmount = 0;
|
this.enteredCounter = 0;
|
||||||
this.setState({isListDropTipShow: false});
|
this.setState({isListDropTipShow: false});
|
||||||
if (e.dataTransfer.files.length) { // uploaded files
|
if (e.dataTransfer.files.length) { // uploaded files
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user