aotrautils 0.0.214 → 0.0.215
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aotrautils/aotrautils.build.js +30 -34
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1.0.0.000 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (22/07/2022-00:32:06)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
4830
|
|
|
4831
|
-
/*utils CLIENT library associated with aotra version : «1.0.0.000 (
|
|
4831
|
+
/*utils CLIENT library associated with aotra version : «1.0.0.000 (22/07/2022-00:32:06)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
|
4834
4834
|
*
|
|
@@ -11678,7 +11678,7 @@ createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null,
|
|
|
11678
11678
|
|
|
11679
11679
|
|
|
11680
11680
|
|
|
11681
|
-
/*utils GEOMETRY library associated with aotra version : «1.0.0.000 (
|
|
11681
|
+
/*utils GEOMETRY library associated with aotra version : «1.0.0.000 (22/07/2022-00:32:06)»*/
|
|
11682
11682
|
/*-----------------------------------------------------------------------------*/
|
|
11683
11683
|
|
|
11684
11684
|
|
|
@@ -12884,7 +12884,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
|
12884
12884
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
|
12885
12885
|
|
|
12886
12886
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
|
12887
|
-
/*utils SERVER library associated with aotra version : «1.0.0.000 (
|
|
12887
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (22/07/2022-00:32:06)»*/
|
|
12888
12888
|
/*-----------------------------------------------------------------------------*/
|
|
12889
12889
|
|
|
12890
12890
|
|
|
@@ -13403,7 +13403,6 @@ WebsocketImplementation={
|
|
|
13403
13403
|
if(!WebsocketImplementation.useSocketIOImplementation) clientSocket.terminate();
|
|
13404
13404
|
else clientSocket.emit("endConnection");
|
|
13405
13405
|
|
|
13406
|
-
// TODO : FIXME : DUPLICATED CODE :
|
|
13407
13406
|
if(!empty(nodeServerInstance.onClientLostListeners))
|
|
13408
13407
|
foreach(nodeServerInstance.onClientLostListeners,l=>{l.execute(clientSocket);});
|
|
13409
13408
|
|
|
@@ -13413,31 +13412,13 @@ WebsocketImplementation={
|
|
|
13413
13412
|
}
|
|
13414
13413
|
|
|
13415
13414
|
clientSocket.isConnectionAlive=false;
|
|
13416
|
-
// try{
|
|
13417
13415
|
|
|
13418
|
-
|
|
13419
|
-
//
|
|
13420
|
-
//
|
|
13416
|
+
// OLD :
|
|
13417
|
+
// if(!WebsocketImplementation.useSocketIOImplementation) clientSocket.ping();
|
|
13418
|
+
// else clientSocket.emit("ping");
|
|
13421
13419
|
|
|
13422
13420
|
nodeServerInstance.send("protocol",{type:"ping"});
|
|
13423
13421
|
|
|
13424
|
-
|
|
13425
|
-
// }catch(error){
|
|
13426
|
-
// lognow("ERROR : A problem occurred when tried to ping client socket : ",error);
|
|
13427
|
-
// // We effectively end the client connection to this server :
|
|
13428
|
-
//
|
|
13429
|
-
// // TODO : FIXME : DUPLICATED CODE :
|
|
13430
|
-
// // TODO : FIXME : Use one single interface !
|
|
13431
|
-
// if(!WebsocketImplementation.useSocketIOImplementation) clientSocket.terminate();
|
|
13432
|
-
// else clientSocket.emit("endConnection");
|
|
13433
|
-
//
|
|
13434
|
-
// // TODO : FIXME : DUPLICATED CODE :
|
|
13435
|
-
// if(!empty(nodeServerInstance.onClientLostListeners))
|
|
13436
|
-
// foreach(nodeServerInstance.onClientLostListeners,l=>{l.execute(clientSocket);});
|
|
13437
|
-
//
|
|
13438
|
-
// return;
|
|
13439
|
-
// }
|
|
13440
|
-
|
|
13441
13422
|
|
|
13442
13423
|
}, nodeServerInstance.clientTimeoutMillis);
|
|
13443
13424
|
|
|
@@ -13666,11 +13647,17 @@ WebsocketImplementation={
|
|
|
13666
13647
|
|
|
13667
13648
|
doOnConnection(nodeClientInstance, clientSocket);
|
|
13668
13649
|
|
|
13669
|
-
// We execute the listeners entry points:
|
|
13650
|
+
// We execute the listeners entry points registration :
|
|
13670
13651
|
foreach(nodeClientInstance.receptionEntryPoints,(receptionEntryPoint)=>{
|
|
13671
13652
|
receptionEntryPoint.execute(clientSocket);
|
|
13672
13653
|
});
|
|
13673
13654
|
|
|
13655
|
+
|
|
13656
|
+
////
|
|
13657
|
+
// TODO : FIXME
|
|
13658
|
+
|
|
13659
|
+
|
|
13660
|
+
|
|
13674
13661
|
};
|
|
13675
13662
|
|
|
13676
13663
|
if(!WebsocketImplementation.useSocketIOImplementation) nodeClientInstance.clientSocket.addEventListener("open",doAllOnConnection);
|
|
@@ -13813,13 +13800,21 @@ WebsocketImplementation={
|
|
|
13813
13800
|
|
|
13814
13801
|
|
|
13815
13802
|
onConnectionToServer:(doOnConnection)=>{
|
|
13803
|
+
const doAllOnConnection=()=>{
|
|
13804
|
+
|
|
13805
|
+
// To avoid triggering this event several times, depending on the implementation :
|
|
13806
|
+
if(browserInstance.hasConnectEventFired) return;
|
|
13807
|
+
browserInstance.hasConnectEventFired=true;
|
|
13808
|
+
|
|
13809
|
+
doOnConnection(browserInstance, clientSocket);
|
|
13810
|
+
|
|
13811
|
+
// DBG
|
|
13812
|
+
clientSocket.clientId=getUUID();
|
|
13813
|
+
|
|
13814
|
+
};
|
|
13816
13815
|
|
|
13817
|
-
|
|
13818
|
-
|
|
13819
|
-
browserInstance.hasConnectEventFired=true;
|
|
13820
|
-
|
|
13821
|
-
if(!WebsocketImplementation.useSocketIOImplementation) browserInstance.clientSocket.addEventListener("open",doOnConnection);
|
|
13822
|
-
else browserInstance.clientSocket.on("connect",doOnConnection);
|
|
13816
|
+
if(!WebsocketImplementation.useSocketIOImplementation) browserInstance.clientSocket.addEventListener("open",doAllOnConnection);
|
|
13817
|
+
else browserInstance.clientSocket.on("connect",doAllOnConnection);
|
|
13823
13818
|
|
|
13824
13819
|
|
|
13825
13820
|
},
|
|
@@ -14281,7 +14276,8 @@ class ListManager{
|
|
|
14281
14276
|
if(!this.isSessionActive()) return false;
|
|
14282
14277
|
const clientPosition=this.getItemPosition(clientId);
|
|
14283
14278
|
//CAUTION : Client position starts at 1 !
|
|
14284
|
-
const
|
|
14279
|
+
const clientIndex=(clientPosition-1);
|
|
14280
|
+
const result=(clientIndex<=this.maxItemsNumber && clientIndex<=this.simultaneousItemsNumber);
|
|
14285
14281
|
|
|
14286
14282
|
return result;
|
|
14287
14283
|
}
|
aotrautils/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.215",
|
|
4
4
|
"main": "aotrautils.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|