Kaynağa Gözat

Set Tippy instances to only respond to touch-holds

vintage
Fen Dweller 5 yıl önce
ebeveyn
işleme
2184289f34
4 değiştirilmiş dosya ile 10 ekleme ve 5 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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]
} }


Yükleniyor…
İptal
Kaydet