Options
All
  • Public
  • Public/Protected
  • All
Menu

Hotpoint plugin manages hotpoints in a viewer. It can be used by DxfViewer and BimViewer. The hotpoint feature in VRViewer is more complex, that one has nothing to do with this plugin. VRViewer is able to use this plugin though.

  • A hotpoint is created and stored by user. User define its html and css.
  • A hotpoint can be added to, and removed from viewer.
  • Caller should set a hotpointId that is unique in the session of current viewer.
  • DxfViewer doesn't maintain the relationship between hotpoint and layout.

Hierarchy

Index

Constructors

Properties

id: string

Methods

  • description

    {en} Adds a hotpoint. Caller should set a hotpointId that is unique in the session of current viewer.

    description

    {zh} 添加热点。 调用者应该设置一个在当前Viewer会话中唯一的热点id。

    example
    const hotpoint = {
    hotpointId: "c6ea70a3-ddb0-4dd0-87c8-bd2491936428",
    anchorPosition: [0, 0, 0],
    html: "<div>hotpoint</div>",
    visible: true,
    };
    const plugin = new HotpointPlugin(viewer);
    plugin.add(hotpoint);

    Parameters

    • hotpoint: Hotpoint
      • {en} hotpoint data.
      • {zh} 热点数据。

    Returns void

  • clear(): void
  • description

    {en} Clears all hotpoints.

    description

    {zh} 清除所有热点。

    example
    const plugin = new HotpointPlugin(viewer);
    plugin.clear();

    Returns void

  • destroy(): void
  • Destroys this Plugin and removes it from its viewer.

    Returns void

  • description

    {en} Moves a hotpoint.

    description

    {zh} 移动热点的位置。

    example
    const hotpointId = "c6ea70a3-ddb0-4dd0-87c8-bd2491936428";
    const plugin = new HotpointPlugin(viewer);
    plugin.move(hotpointId, [10, 10, 0]);

    Parameters

    Returns void

  • remove(hotpointId: string): void
  • description

    {en} Removes a hotpoint by given hotpointId.

    description

    {zh} 根据热点id删除热点。

    example
    const hotpointId = "c6ea70a3-ddb0-4dd0-87c8-bd2491936428";
    const plugin = new HotpointPlugin(viewer);
    plugin.remove(hotpointId);

    Parameters

    • hotpointId: string
      • {en} hotpoint id.
      • {zh} 热点id。

    Returns void

  • setVisible(hotpointId: string, visible: boolean): void
  • description

    {en} Hides or show a hotpoint.

    description

    {zh} 显示或隐藏一个热点。

    example
    const hotpointId = "c6ea70a3-ddb0-4dd0-87c8-bd2491936428";
    const plugin = new HotpointPlugin(viewer);
    plugin.setVisible(hotpointId, false);

    Parameters

    • hotpointId: string
    • visible: boolean

    Returns void

Generated using TypeDoc