From 3edd5c6117a084043894dd444365ee5d5de057b7 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Wed, 7 Jun 2023 17:32:38 +0200 Subject: [PATCH] reactive --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 27934b9..87d69d8 100644 --- a/index.html +++ b/index.html @@ -3271,13 +3271,15 @@ AFRAME.registerComponent('startfunctions', { let ed1 = addCodeEditor( 'nodalValue*nodalValue', 'javascript', '-.3 1.6 -.5') addConnectorsToCodeEditor( ed1 ) let ed2 = addCodeEditor( 'addNewNote("nodalValue: "+nodalValue)', 'javascript', '.2 1.4 -.5') + // no error but doesn't get triggered addConnectorsToCodeEditor( ed2, true, false ) setTimeout( _ => { - console.clear() + //console.clear() //console.log( connectionsBetweenEditors( editors[0], editors[2] ) ) //console.log( numberOfPredecessors( g ), numberOfSuccessors( g ) ) generateGraphThenRun() } , 1000 ) + editors.map( ed => { ed.element.addEventListener('released', e => { console.log('regen'); generateGraphThenRun() } ) } ) // should be done after each codeEditors gets connectors added then on editor moves }, false); //startExperience()