Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question regarding Fitbit Studio and JS hook

Dear community,

 

I have the following issue. I am using the "use" keyword to create my text,

Now I want when the user click on a text something to happen.

 

My code is:

<defs>
<symbol id="my-tile-item" href="#tile-list-item" focusable="false"
pointer-events="none" system-events="all">
<text id="text" />
<rect id="tile-divider-bottom" class="tile-divider-bottom" />
<rect id="touch-me" pointer-events="all" x="0" y="0" width="100%"
height="100%-2" opacity="0" />

</symbol>
</defs>
<use id="my-list" href="#tile-list">
<var id="separator-height-bottom" value="2" />
<use href="#my-tile-item" class="tile-list-item">
<set href="text" attributeName="text-buffer" to="Job" />
</use>

 

 

 

and the JS is:

let click_setting = document.getElementsByTagName("text");
 
click_setting.forEach(function(element) {
  element.onclick  = function(e) {
  console.log("click");
    }

});

 

Do you have idea why the JS couldn't create the click hook and show the information on the console?

 

Kind Regards,

Aleks

 

Best Answer
0 Votes
1 REPLY 1

tried pointer-events="visible"?

Peter McLennan
Gondwana Software
Best Answer
0 Votes