mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 03:03:35 +02:00
Better variable name
This commit is contained in:
parent
7e56d0fae6
commit
dcd632013f
1 changed files with 7 additions and 7 deletions
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
var canWriteAssets = false;
|
var canWriteAssets = false;
|
||||||
var xmlHttpRequest = null;
|
var xmlHttpRequest = null;
|
||||||
var isDownloading = false; // Explicitly track download request status.
|
var isPreparing = false; // Explicitly track download request status.
|
||||||
|
|
||||||
function injectCommonCode(isDirectoryPage) {
|
function injectCommonCode(isDirectoryPage) {
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
function startAutoDownload() {
|
function startAutoDownload() {
|
||||||
|
|
||||||
// One file request at a time.
|
// One file request at a time.
|
||||||
if (isDownloading) {
|
if (isPreparing) {
|
||||||
console.log("WARNIKNG: Clara.io FBX: Prepare only one download at a time");
|
console.log("WARNIKNG: Clara.io FBX: Prepare only one download at a time");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
var message = this.responseText.slice(responseTextIndex);
|
var message = this.responseText.slice(responseTextIndex);
|
||||||
var statusMessage = "";
|
var statusMessage = "";
|
||||||
|
|
||||||
if (isDownloading) { // Ignore messages in flight after finished/cancelled.
|
if (isPreparing) { // Ignore messages in flight after finished/cancelled.
|
||||||
var lines = message.split(/[\n\r]+/);
|
var lines = message.split(/[\n\r]+/);
|
||||||
|
|
||||||
for (var i = 0, length = lines.length; i < length; i++) {
|
for (var i = 0, length = lines.length; i < length; i++) {
|
||||||
|
@ -222,11 +222,11 @@
|
||||||
xmlHttpRequest.onload = function () {
|
xmlHttpRequest.onload = function () {
|
||||||
var statusMessage = "";
|
var statusMessage = "";
|
||||||
|
|
||||||
if (!isDownloading) {
|
if (!isPreparing) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
isDownloading = false;
|
isPreparing = false;
|
||||||
|
|
||||||
var HTTP_OK = 200;
|
var HTTP_OK = 200;
|
||||||
if (this.status !== HTTP_OK) {
|
if (this.status !== HTTP_OK) {
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
xmlHttpRequest = null;
|
xmlHttpRequest = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
isDownloading = true;
|
isPreparing = true;
|
||||||
|
|
||||||
console.log("Clara.io FBX: Request zip file for " + uuid);
|
console.log("Clara.io FBX: Request zip file for " + uuid);
|
||||||
EventBridge.emitWebEvent(CLARA_IO_STATUS + " Initiating download");
|
EventBridge.emitWebEvent(CLARA_IO_STATUS + " Initiating download");
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelClaraDownload() {
|
function cancelClaraDownload() {
|
||||||
isDownloading = false;
|
isPreparing = false;
|
||||||
|
|
||||||
if (xmlHttpRequest) {
|
if (xmlHttpRequest) {
|
||||||
xmlHttpRequest.abort();
|
xmlHttpRequest.abort();
|
||||||
|
|
Loading…
Reference in a new issue