Bläddra i källkod

Set Tippy instances to only respond to touch-holds

master
Fen Dweller 5 år sedan
förälder
incheckning
2184289f34
4 ändrade filer med 10 tillägg och 5 borttagningar
  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 Visa fil

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


+ 2
- 1
src/components/NavButton.vue Visa fil

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


+ 4
- 2
src/components/Statblock.vue Visa fil

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


return tippy(elem, { 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 const tooltip = elem.querySelector(".tooltip-template") as HTMLElement


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


+ 2
- 1
src/game/interface.ts Visa fil

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


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


Laddar…
Avbryt
Spara