Bring back the active annotation logic to the v-annotations primitive

This commit is contained in:
Michael Lange
2021-02-23 20:05:26 -08:00
parent b1f3618c3f
commit 2178bbd669

View File

@@ -5,8 +5,8 @@
type="button"
title={{annotation.label}}
class="indicator {{if (or
(and @key (eq-by @key annotation.annotation this.activeAnnotation))
(and (not @key) (eq annotation.annotation this.activeAnnotation))
(and @key (eq-by @key annotation.annotation @activeAnnotation))
(and (not @key) (eq annotation.annotation @activeAnnotation))
) "is-active"}}"
{{on "click" (fn this.selectAnnotation annotation.annotation)}}>
{{x-icon annotation.icon}}