English中文

ToggleButtonViewModel

new Cesium.ToggleButtonViewModel(command, options)

公开切换按钮属性的视图模型。 A view model which exposes the properties of a toggle button.
名称 Name 类型 Type 说明 Description
command Command 切换按钮时将执行的命令。 The command which will be executed when the button is toggled.
options object 可选 optional 具有以下属性的对象: Object with the following properties:
名称 Name 类型 Type 默认值 Default 说明 Description
toggled boolean false 可选 optional 一个布尔值,指示是否应首先切换按钮。 A boolean indicating whether the button should be initially toggled.
tooltip string '' 可选 optional 包含按钮工具提示的字符串。 A string containing the button's tooltip.

成员 Members

获取切换按钮时将执行的命令。 Gets the command which will be executed when the button is toggled.
获取或设置按钮当前是否处于切换状态。这个性质是可以观察到的。 Gets or sets whether the button is currently toggled. This property is observable.
默认值: Default Value: false
获取或设置按钮的工具提示。这个性质是可以观察到的。 Gets or sets the button's tooltip. This property is observable.
默认值: Default Value: ''
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.