Widget: Compass: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 606: Line 606:
             }
             }
         };
         };
       
        document.getElementById('cmp-container').addEventListener('click', event => {
            if (!event.currentTarget.classList.contains('choice')) return;


             const id = event.currentTarget.id;
        const handler = event => {
            console.log('target', event.target)
            console.log('c-target', event.currentTarget)
            // if (!event.target.classList.contains('choice')) return;
 
             const id = event.target.id;
             console.log('element id=' + id);
             console.log('element id=' + id);
             console.log('actions', actions[id].filter)
             console.log('actions', actions[id].filter)
         }, { passive: true });
         }
 
        document.querySelectorAll('.choice').forEach(el => void el.addEventListener('click', handler, { passive: true }));
       
     </script>
     </script>
</includeonly>
</includeonly>

Revision as of 12:45, 24 November 2022

Development version of the Compass.
Not ready for production!