Disfactory / frontend

Frontend of disfactory.tw. Built with Vue.js. For backend please checkout https://github.com/Disfactory/Disfactory
https://disfactory.tw
MIT License
19 stars 16 forks source link

四塊均需 hover message #77

Closed jidanni closed 3 years ago

jidanni commented 4 years ago

如 "T" 不敢按,因不知是什麼功能。 3453-0 故四塊均需 hoverover message saying what they do, e.g., 放大,縮小…

jidanni commented 4 years ago

"T" 即要示「篩選」。

Yukaii commented 3 years ago

考慮使用 Vuetify 按鈕的 Tooltip 元件 https://vuetifyjs.com/en/components/tooltips/#usage

https://github.com/Disfactory/frontend/blob/f7da19b1afe5a95e2844e350d6835e21b202b562/src/lib/map.ts#L448-L454

因為原本的控制鍵是用 openlayer 做的,所以需要研究 openlayer 的按鈕如何加上 title attribute

Yukaii commented 3 years ago
Yukaii commented 3 years ago

Assign to @komali2

komali2 commented 3 years ago

This was potentially fixed upstream by OM, not sure, in any case, there's a title attribute now, and hover works.

However, it's in English, so I'll submit a PR or at least issue to OM to allow insertion of a custom string, so translated strings can be used.

komali2 commented 3 years ago

oh snap https://github.com/openlayers/openlayers/blob/main/src/ol/control/Zoom.js#L70 the feature already exists!

komali2 commented 3 years ago

We'll change it to mandarin at least for now