control~MousePosition(options)

鼠标位置控件,鼠标在全景图上移动时显示出鼠标位置对应的全景球体坐标。

Summary

Methods:
activate

激活控件

deactivate

停止控件

getExclusive

获得当前组件是否为排他控件

getParent

获取控件绑定的VR对象。

getStatus

返回控件当前状态.

getType

返回控件类型 Control.type

hide

隐藏鼠标移动控件

setExclusive

设置当前控件是否为VR排他控件

show

显示鼠标移动控件

Constructor

new MousePosition(options)

Parameters:
Name Type Description
options Object

可选项。

Example
let mousePosition = new hpano.control.MousePosition({
    style: "textColor: ff0000;fontSize: 14",
});

Methods

activate()

激活控件

deactivate()

停止控件

getExclusive()

获得当前组件是否为排他控件

getParent() → {Panorama}

获取控件绑定的VR对象。

Returns:
Panorama -

VR对象。

getStatus() → {Boolean}

返回控件当前状态.

Returns:
Boolean -

true:表示激活 false:表示禁用。

getType() → {String}

返回控件类型 Control.type

Returns:
String

hide()

隐藏鼠标移动控件

setExclusive(flag)

设置当前控件是否为VR排他控件

Parameters:
Name Type Description
flag Boolean

false 表示当前控件为VR非排他控件,当激活一个非默认控件的时候会禁用其他控件 ,一旦结束当前非默认控件行为的话,会自动激活VR的所有非排他控件
true 表示当前控件为VR排他控件,不会自动激活

show()

显示鼠标移动控件