Skip to content

Instantly share code, notes, and snippets.

@remygrandin
Last active May 17, 2020 18:15
Show Gist options
  • Save remygrandin/e741047c9440967851f9213c130eb5c2 to your computer and use it in GitHub Desktop.
Save remygrandin/e741047c9440967851f9213c130eb5c2 to your computer and use it in GitHub Desktop.
Fitbit SDK bug
<svg class="background">
<use href="#panoramaview" id="hview">
<use href="#panoramaview-item">
<use id="btntest" href="#square-button" y="32%" height="38%" fill="red">
<set href="#text" attributeName="text-buffer" to="btn test" />
<set href="#text" attributeName="text-anchor" to="middle" />
</use>
</use>
<use href="#panoramaview-item">
<text fill="white">2</text>
</use>
</use>
</svg>
import document from "document";
document.getElementById("btntest").onactivate = function(evt) {
console.log("triggered");
}
// VVVVVVVV if you remove this line bellow, the event is not called twice VVVVVVVV
document.getElementById("hview");
<svg>
<defs>
<link rel="stylesheet" href="styles.css" />
<link rel="import" href="/mnt/sysassets/widgets_common.gui" />
<link rel="import" href="/mnt/sysassets/widgets/square_button_widget.gui" />
<link rel="stylesheet" href="/mnt/sysassets/widgets/dynamic_textarea.css"/>
<link rel="import" href="/mnt/sysassets/widgets/baseview_widget.gui" />
<link rel="import" href="/mnt/sysassets/widgets/panoramaview_widget.gui" />
</defs>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment