Browse Source

Set Tippy instances to only respond to touch-holds

vintage
Fen Dweller 5 years ago
parent
commit
2184289f34
4 changed files with 10 additions and 5 deletions
  1. +2
    -1
      src/components/ChoiceButton.vue
  2. +2
    -1
      src/components/NavButton.vue
  3. +4
    -2
      src/components/Statblock.vue
  4. +2
    -1
      src/game/interface.ts

+ 2
- 1
src/components/ChoiceButton.vue View File

@@ -30,7 +30,8 @@ export default class ChoiceButton extends Vue {
tippy(
elem,
{
content: tooltip
content: tooltip,
touch: ["hold", 500]
}
)
}


+ 2
- 1
src/components/NavButton.vue View File

@@ -30,7 +30,8 @@ export default class NavButton extends Vue {
tippy(
elem,
{
content: tooltip
content: tooltip,
touch: ["hold", 500]
}
)
}


+ 4
- 2
src/components/Statblock.vue View File

@@ -130,7 +130,8 @@ export default class Statblock extends Vue {
const tooltip = elem.querySelector(".tooltip-template") as HTMLElement

return tippy(elem, {
content: tooltip
content: tooltip,
touch: ["hold", 500]
})
})
})
@@ -143,7 +144,8 @@ export default class Statblock extends Vue {
const tooltip = elem.querySelector(".tooltip-template") as HTMLElement

return tippy(elem, {
content: tooltip
content: tooltip,
touch: ["hold", 500]
})
})
createSingleton(tippyInstances, { delay: 500 })


+ 2
- 1
src/game/interface.ts View File

@@ -208,7 +208,8 @@ export class PropElem implements LogEntry {
span.appendChild(icon)

tippy(icon, {
content: tooltipTemplate
content: tooltipTemplate,
touch: ["hold", 500]
})
return [span]
}


Loading…
Cancel
Save