From 079427a5d89fd2ff1ca2e50d07c44661e755b95b Mon Sep 17 00:00:00 2001 From: kovacsv Date: Thu, 26 Aug 2021 08:22:48 +0200 Subject: [PATCH] racing conditions on callback function #126 --- website/o3dv/js/website.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/o3dv/js/website.js b/website/o3dv/js/website.js index 2781ae1..5f5fa48 100644 --- a/website/o3dv/js/website.js +++ b/website/o3dv/js/website.js @@ -127,8 +127,6 @@ OV.Website = class OnModelFinished (importResult, threeMeshes) { - let importedExtension = OV.GetFileExtension (importResult.mainFile); - this.eventHandler.HandleEvent ('model_loaded', { extension : importedExtension }); this.model = importResult.model; this.ShowViewer (true); this.viewer.AddMeshes (threeMeshes); @@ -444,6 +442,8 @@ OV.Website = class onFinish : (importResult, threeMeshes) => { this.OnModelFinished (importResult, threeMeshes); + let importedExtension = OV.GetFileExtension (importResult.mainFile); + this.eventHandler.HandleEvent ('model_loaded', { extension : importedExtension }); }, onRender : () => {