Skip to content

Commit

Permalink
Merge pull request #77 from shinich39/fix-decision
Browse files Browse the repository at this point in the history
Show invisible options and hide empty options
  • Loading branch information
050644zf authored Nov 25, 2024
2 parents 2440602 + 3c60a9f commit fa2d19e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions reader/src/ASTRv2/content/decision.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
<template>
<div :class="line.prop">
<div
v-for="(option, index) in line.attributes.values.split(';')"
v-for="(option, index) in line.attributes.options.split(';')"
:key="option"
class="option"
@click="jumpTo(line.targetLine['option' + option])"
@click="
jumpTo(line.targetLine['option' + (
line.attributes.values.split(';')[index] ||
line.attributes.values.split(';').pop()
)])
"
@mouseover="
addClass(line.targetLine['option' + option], 'PredicateFocused')
addClass(line.targetLine['option' + (
line.attributes.values.split(';')[index] ||
line.attributes.values.split(';').pop()
)], 'PredicateFocused')
"
@mouseout="
removeClass(line.targetLine['option' + option], 'PredicateFocused')
removeClass(line.targetLine['option' + (
line.attributes.values.split(';')[index] ||
line.attributes.values.split(';').pop()
)], 'PredicateFocused')
"
v-html="parseContent(line.attributes.options.split(';')[index])"
v-html="parseContent(option)"
></div>
</div>
</template>
Expand Down

0 comments on commit fa2d19e

Please sign in to comment.