返回介绍

中文

英文

Country

发布于 2021-10-30 01:00:51 字数 3310 浏览 924 评论 0 收藏 0


Each Country corresponds to a specific code in CountryData. Depending on
data availability and user activity, a Country can be in the following states:

Selected
When the user clicks on a Country, it is highlighted and becomes selected. The country is called a
selected country.

The color of Selected country can be set through configure() as follows:

controller.configure({
        color: {
                selected:0xff0000
        }
});

Or it can be changed dynamically with setSelectedColor() .
Related
Those countries connected to the selected country through 'in line' or 'out line' are called related
countries.

The brightness of related countries can be set through configure() as
follows:

controller.configure({
        brightness: {
                related:0.8
        }
});

Or it can be changed dynamically with adjustRelatedBrightness(). Default
value: 0.5

Mentioned
All other countries appear in the input dataset but are not 'selected' or 'related' are called
'mentioned'.

The Color of Mentioned country can be set to be brighter than Unmentioned country with
ligtenMentioned(true); to disable this feature use ligtenMentioned(false).

The brightness of Mentioned country can be set through configure() as
follow:

controller.configure({
        color: {
                mentioned:0.8
        }
});

Or it can be modified dynamically with adjustMentionedBrightness() when ligtenMentioned(true) is called. Default value: 0.5

Unmentioned
Countries in CountryData but not in the input data are called
'Unmentioned'.

Unclickable
When a country is set to unclickable, it will be not highlighted when clicked and it will be cause the
globe to rotate. (Normally after a country has been clicked, the globe will turn and let the clicked
country facing the user.).

Unmentioned countries can be set to 'unclickable' through disableUnmentioned(true).
To disable this
feature call disableUnmentioned(false).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文