From ebae8e4e377b50fa2bf5fc9f9d76e5eddaa1d2fa Mon Sep 17 00:00:00 2001
From: neodigm <3151842+neodigm@users.noreply.github.com>
Date: Sat, 17 Aug 2024 11:28:26 -0500
Subject: [PATCH] keylime_doc
---
dist/index.html | 1 -
dist/neodigm55__v3_5.js | 14 +++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dist/index.html b/dist/index.html
index a559305..6c50862 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -46,7 +46,6 @@
stuff
-
diff --git a/dist/neodigm55__v3_5.js b/dist/neodigm55__v3_5.js
index 912c976..1103932 100644
--- a/dist/neodigm55__v3_5.js
+++ b/dist/neodigm55__v3_5.js
@@ -874,19 +874,19 @@ class NeodigmKeylime { // Universal Click / left click / long tap / body exit
static subscribe( eventID, callbackF, useCapture = true ){ // USAGE: NeodigmKeylime.subscribe("click", (ev)=>{console.log("dux")})
if( this.bIsInit && !this.bIsPause && eventID && callbackF ){
const subscriberID = neodigmUtils.genHash( eventID + callbackF )
- if( !this.subscribersKL[ subscriberID ] ){
+ if( !this.subscribersKL[ subscriberID ] ){ // once | a subscriber is unique by event type e.g., click
this.subscribersKL[ subscriberID ] = { "eventID": eventID, "callbackF": callbackF }
- if( !this.listenersKL[ eventID ] ){
+ if( !this.listenersKL[ eventID ] ){ // once
this.listenersKL[ eventID ] = this._d[ neodigmOpt.N55_APP_STATE.CONTEXT ]
.addEventListener( eventID, (ev)=>{ NeodigmKeylime.fire(ev) }, useCapture )
+ if( neodigmOpt.N55_DEBUG_lOG ) console.log( "~KeyLimeN55 subscrb | ", this.subscribersKL, this.listenersKL)
}
}
- console.log( "~~~ kl this.subscribersKL, this.listenersKL | " , this.subscribersKL, this.listenersKL) // TODO Make this system deb tog
return subscriberID;
- }
+ }
return false;
}
- static unsubscribe( subscriberID ){ // no need to unlisten at dom level
+ static unsubscribe( subscriberID ){ // no need to unlisten at DOM level because there is a 1:M (subcrb:dom event)
if( this.bIsInit && !this.bIsPause ){
if( subscriberID && this.subscribersKL[ subscriberID ] ){
delete this.subscribersKL[ subscriberID ]
@@ -898,8 +898,8 @@ class NeodigmKeylime { // Universal Click / left click / long tap / body exit
static fire( ev ){
if( this.bIsInit && !this.bIsPause ){
console.log( "~~~ fire | " , ev )
- // push event onto macro stack, if in recording state
- // iterate object firing callback if eventID matches
+ // TODO push event onto macro stack, if in recording state
+ // TODO iterate object firing callback if eventID matches
return true;
}
return false;