/
NavigationAidControl.tsx
59 lines (51 loc) · 1.87 KB
/
NavigationAidControl.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module NavigationAids
*/
import type * as React from "react";
import type { IModelConnection } from "@itwin/core-frontend";
import { UiEvent } from "@itwin/appui-abstract";
import type { ConfigurableCreateInfo } from "../configurableui/ConfigurableUiControl";
import {
ConfigurableUiControl,
ConfigurableUiControlType,
} from "../configurableui/ConfigurableUiControl";
/** NavigationAid Activated Event Args interface.
* @public
*/
export interface NavigationAidActivatedEventArgs {
navigationAidId: string;
iModelConnection: IModelConnection;
}
/** NavigationAid Activated Event class.
* @public
*/
// eslint-disable-next-line deprecation/deprecation
export class NavigationAidActivatedEvent extends UiEvent<NavigationAidActivatedEventArgs> {}
/** The base class for Navigation Aid controls.
* @public
*/
export class NavigationAidControl extends ConfigurableUiControl {
private _reactNode: React.ReactNode;
constructor(info: ConfigurableCreateInfo, options: any) {
super(info, options);
}
/** The React element associated with this control */
public get reactNode(): React.ReactNode {
return this._reactNode;
}
public set reactNode(r: React.ReactNode) {
this._reactNode = r;
}
/** Square size of navigation aid. Default size is "64px". Override to set a different size. */
public getSize(): string | undefined {
return undefined;
}
/** Get the type of this control. */
public getType(): ConfigurableUiControlType {
return ConfigurableUiControlType.NavigationAid;
}
}