@itwin/hypermodeling-frontend 3.6.0-dev.36 → 3.6.0-dev.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/HyperModeling.d.ts +114 -114
- package/lib/cjs/HyperModeling.js +239 -239
- package/lib/cjs/HyperModelingConfig.d.ts +54 -54
- package/lib/cjs/HyperModelingConfig.js +9 -9
- package/lib/cjs/HyperModelingConfig.js.map +1 -1
- package/lib/cjs/HyperModelingDecorator.d.ts +110 -110
- package/lib/cjs/HyperModelingDecorator.js +337 -337
- package/lib/cjs/HyperModelingDecorator.js.map +1 -1
- package/lib/cjs/PopupToolbar.d.ts +24 -24
- package/lib/cjs/PopupToolbar.js +57 -57
- package/lib/cjs/PopupToolbar.js.map +1 -1
- package/lib/cjs/SectionDrawingLocationState.d.ts +90 -90
- package/lib/cjs/SectionDrawingLocationState.js +136 -136
- package/lib/cjs/SectionDrawingLocationState.js.map +1 -1
- package/lib/cjs/SectionGraphicsProvider.d.ts +13 -13
- package/lib/cjs/SectionGraphicsProvider.js +273 -273
- package/lib/cjs/SectionGraphicsProvider.js.map +1 -1
- package/lib/cjs/SectionMarkerHandler.d.ts +52 -52
- package/lib/cjs/SectionMarkerHandler.js +112 -112
- package/lib/cjs/SectionMarkerHandler.js.map +1 -1
- package/lib/cjs/SectionMarkers.d.ts +82 -82
- package/lib/cjs/SectionMarkers.js +174 -174
- package/lib/cjs/SectionMarkers.js.map +1 -1
- package/lib/cjs/Tools.d.ts +5 -5
- package/lib/cjs/Tools.js +170 -170
- package/lib/cjs/hypermodeling-frontend.d.ts +13 -13
- package/lib/cjs/hypermodeling-frontend.js +29 -29
- package/lib/cjs/hypermodeling-frontend.js.map +1 -1
- package/lib/esm/HyperModeling.d.ts +114 -114
- package/lib/esm/HyperModeling.js +235 -235
- package/lib/esm/HyperModelingConfig.d.ts +54 -54
- package/lib/esm/HyperModelingConfig.js +8 -8
- package/lib/esm/HyperModelingConfig.js.map +1 -1
- package/lib/esm/HyperModelingDecorator.d.ts +110 -110
- package/lib/esm/HyperModelingDecorator.js +333 -333
- package/lib/esm/HyperModelingDecorator.js.map +1 -1
- package/lib/esm/PopupToolbar.d.ts +24 -24
- package/lib/esm/PopupToolbar.js +53 -53
- package/lib/esm/PopupToolbar.js.map +1 -1
- package/lib/esm/SectionDrawingLocationState.d.ts +90 -90
- package/lib/esm/SectionDrawingLocationState.js +132 -132
- package/lib/esm/SectionDrawingLocationState.js.map +1 -1
- package/lib/esm/SectionGraphicsProvider.d.ts +13 -13
- package/lib/esm/SectionGraphicsProvider.js +269 -269
- package/lib/esm/SectionGraphicsProvider.js.map +1 -1
- package/lib/esm/SectionMarkerHandler.d.ts +52 -52
- package/lib/esm/SectionMarkerHandler.js +108 -108
- package/lib/esm/SectionMarkerHandler.js.map +1 -1
- package/lib/esm/SectionMarkers.d.ts +82 -82
- package/lib/esm/SectionMarkers.js +168 -168
- package/lib/esm/SectionMarkers.js.map +1 -1
- package/lib/esm/Tools.d.ts +5 -5
- package/lib/esm/Tools.js +166 -166
- package/lib/esm/hypermodeling-frontend.d.ts +13 -13
- package/lib/esm/hypermodeling-frontend.js +17 -17
- package/lib/esm/hypermodeling-frontend.js.map +1 -1
- package/lib/public/locales/en/HyperModeling.json +32 -32
- package/package.json +13 -13
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module HyperModeling
|
|
3
|
-
*/
|
|
4
|
-
import { SectionType } from "@itwin/core-common";
|
|
5
|
-
import { IModelConnection, ScreenViewport } from "@itwin/core-frontend";
|
|
6
|
-
import { HyperModelingDecorator } from "./HyperModelingDecorator";
|
|
7
|
-
import { HyperModelingConfig, SectionGraphicsConfig, SectionMarkerConfig } from "./HyperModelingConfig";
|
|
8
|
-
import { SectionMarkerHandler } from "./SectionMarkerHandler";
|
|
9
|
-
/** @internal */
|
|
10
|
-
export interface MarkerData {
|
|
11
|
-
readonly label: string;
|
|
12
|
-
readonly image: HTMLImageElement | undefined;
|
|
13
|
-
}
|
|
14
|
-
interface Resources {
|
|
15
|
-
readonly namespace?: string;
|
|
16
|
-
readonly markers: {
|
|
17
|
-
readonly section: MarkerData;
|
|
18
|
-
readonly plan: MarkerData;
|
|
19
|
-
readonly elevation: MarkerData;
|
|
20
|
-
readonly detail: MarkerData;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/** The API entry point for the hypermodeling package. Applications must call [[initialize]] and await the result before using the package.
|
|
24
|
-
* The behavior of the package can be customized via a [[HyperModelingConfig]] supplied to [[initialize]], [[updateConfiguration]], or [[replaceConfiguration]].
|
|
25
|
-
* Hypermodeling mode can be enabled or disabled via [[startOrStop]], which returns a [[HyperModelingDecorator]] when enabling hypermodeling.
|
|
26
|
-
* Consult the package's `README.md` for a description of the available functionality.
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
export declare class HyperModeling {
|
|
30
|
-
/** @internal */
|
|
31
|
-
static resources?: Resources;
|
|
32
|
-
private static _markerHandler?;
|
|
33
|
-
private static _markerConfig;
|
|
34
|
-
private static _graphicsConfig;
|
|
35
|
-
private static shutdown;
|
|
36
|
-
/** Returns whether the hypermodeling package is initialized.
|
|
37
|
-
* @see [[HyperModeling.initialize]] to initialize the package.
|
|
38
|
-
*/
|
|
39
|
-
static get isInitialized(): boolean;
|
|
40
|
-
/** Invoke this method to initialize the hypermodeling package for use. You *must* await the result before using any of this package's APIs.
|
|
41
|
-
* Typically an application would invoke this after [IModelApp.startup]($frontend), e.g.,
|
|
42
|
-
* ```ts
|
|
43
|
-
* await IModelApp.startup();
|
|
44
|
-
* await HyperModeling.initialize();
|
|
45
|
-
* ```
|
|
46
|
-
* Calling this method again after the first initialization behaves the same as calling [[HyperModeling.replaceConfiguration]].
|
|
47
|
-
* @note The hypermodeling package will be reset to uninitialized after [IModelApp.shutdown]($frontend) is invoked.
|
|
48
|
-
* @see [[replaceConfiguration]] and [[updateConfiguration]] to modify the configuration after initialization.
|
|
49
|
-
*/
|
|
50
|
-
static initialize(config?: HyperModelingConfig): Promise<void>;
|
|
51
|
-
private static ensureInitialized;
|
|
52
|
-
/** Replaces the current package configuration, overwriting all previous settings. Passing `undefined` resets all settings to defaults.
|
|
53
|
-
* @see [[HyperModeling.updateConfiguration]] for overriding specific aspects of the configuration.
|
|
54
|
-
*/
|
|
55
|
-
static replaceConfiguration(config?: HyperModelingConfig): void;
|
|
56
|
-
/** Overrides specific aspects of the current package configuration. Any field that is not `undefined` will be replaced in the current configuration;
|
|
57
|
-
* the rest will retain their current values.
|
|
58
|
-
* @see [[HyperModeling.replaceConfiguration]].
|
|
59
|
-
*/
|
|
60
|
-
static updateConfiguration(config: HyperModelingConfig): void;
|
|
61
|
-
/** The handler that defines interactions with [[SectionMarker]]s.
|
|
62
|
-
* @see [[initialize]] to override the default handler at package initialization.
|
|
63
|
-
* @see [[updateConfiguration]] or [[replaceConfiguration]] to change the current handler.
|
|
64
|
-
*/
|
|
65
|
-
static get markerHandler(): SectionMarkerHandler;
|
|
66
|
-
/** The current marker display configuration applied to any newly-created [[HyperModelingDecorator]]s.
|
|
67
|
-
* @see [[initialize]] to override the default configuration at package initialization.
|
|
68
|
-
* @see [[updateConfiguration]] or [[replaceConfiguration]] to change the current configuration.
|
|
69
|
-
* @see [[HyperModelingDecorator.replaceConfiguration]] or [[HyperModelingDecorator.updateConfiguration]] to change the configuration for an existing decorator.
|
|
70
|
-
*/
|
|
71
|
-
static get markerConfig(): SectionMarkerConfig;
|
|
72
|
-
/** This graphics options applied to graphics displayed by all [[HyperModelingDecorator]]s.
|
|
73
|
-
* @see [[updateConfiguration]] or [[replaceConfiguration]] to change the current configuration.
|
|
74
|
-
*/
|
|
75
|
-
static get graphicsConfig(): SectionGraphicsConfig;
|
|
76
|
-
/** Returns true if the specified iModel contains any [SectionDrawingLocation]($backend)s. Hypermodeling is based on section drawing locations,
|
|
77
|
-
* so if none are present, hypermodeling features are not relevant to the iModel. Attempting to use those features with such an iModel is fine,
|
|
78
|
-
* but probably not useful.
|
|
79
|
-
*/
|
|
80
|
-
static isSupportedForIModel(imodel: IModelConnection): Promise<boolean>;
|
|
81
|
-
/** Returns whether hypermodeling is currently enabled for the specified viewport.
|
|
82
|
-
* @see [[startOrStop]] to enable or disable hypermodeling for a viewport.
|
|
83
|
-
*/
|
|
84
|
-
static isEnabledForViewport(viewport: ScreenViewport): boolean;
|
|
85
|
-
/** Start or stop hypermodeling mode for the specified viewport.
|
|
86
|
-
* Enabling hypermodeling registers and returns a [[HyperModelingDecorator]] to display [[SectionMarker]]s within the viewport.
|
|
87
|
-
* Disabling hypermodeling removes that decorator.
|
|
88
|
-
* @param viewport The hypermodeling viewport
|
|
89
|
-
* @param start `true` to enter hypermodeling mode, `false` to exit, or `undefined` to toggle the current mode.
|
|
90
|
-
* @returns The new decorator is hypermodeling was successfully enabled.
|
|
91
|
-
* @note Enabling hypermodeling may fail if the viewport is not viewing a spatial model or if the viewport's iModel does not support hypermodeling.
|
|
92
|
-
* @see [[start]] and [[stop]].
|
|
93
|
-
* @see [[isSupportedForIModel]].
|
|
94
|
-
*/
|
|
95
|
-
static startOrStop(viewport: ScreenViewport, start?: boolean): Promise<HyperModelingDecorator | undefined>;
|
|
96
|
-
/** Start hypermodeling mode for the specified viewport if it is not currently enabled.
|
|
97
|
-
* If hypermodeling is already enabled for the viewport, the existing decorator is returned; otherwise, a new decorator is created.
|
|
98
|
-
* @param viewport The viewport for which to enable hypermodeling
|
|
99
|
-
* @returns The decorator that implements hypermodeling features for the viewport, or `undefined` if hypermodeling could not be enabled.
|
|
100
|
-
* @note Enabling hypermodeling may fail if the viewport is not viewing a spatial model or if the viewport's iModel does not support hypermodeling.
|
|
101
|
-
*/
|
|
102
|
-
static start(viewport: ScreenViewport): Promise<HyperModelingDecorator | undefined>;
|
|
103
|
-
private static _start;
|
|
104
|
-
/** Stop hypermodeling mode for the specified viewport if it is currently enabled. This disposes of the [[HyperModelingDecorator]] associated with the viewport.
|
|
105
|
-
* @see [[start]] to enable hypermodeling for a viewport.
|
|
106
|
-
* @see [[startOrStop]] to toggle hypermodeling mode.
|
|
107
|
-
*/
|
|
108
|
-
static stop(viewport: ScreenViewport): void;
|
|
109
|
-
/** @internal */
|
|
110
|
-
static get namespace(): string | undefined;
|
|
111
|
-
/** @internal */
|
|
112
|
-
static getMarkerData(type: SectionType): MarkerData;
|
|
113
|
-
}
|
|
114
|
-
export {};
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module HyperModeling
|
|
3
|
+
*/
|
|
4
|
+
import { SectionType } from "@itwin/core-common";
|
|
5
|
+
import { IModelConnection, ScreenViewport } from "@itwin/core-frontend";
|
|
6
|
+
import { HyperModelingDecorator } from "./HyperModelingDecorator";
|
|
7
|
+
import { HyperModelingConfig, SectionGraphicsConfig, SectionMarkerConfig } from "./HyperModelingConfig";
|
|
8
|
+
import { SectionMarkerHandler } from "./SectionMarkerHandler";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export interface MarkerData {
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly image: HTMLImageElement | undefined;
|
|
13
|
+
}
|
|
14
|
+
interface Resources {
|
|
15
|
+
readonly namespace?: string;
|
|
16
|
+
readonly markers: {
|
|
17
|
+
readonly section: MarkerData;
|
|
18
|
+
readonly plan: MarkerData;
|
|
19
|
+
readonly elevation: MarkerData;
|
|
20
|
+
readonly detail: MarkerData;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** The API entry point for the hypermodeling package. Applications must call [[initialize]] and await the result before using the package.
|
|
24
|
+
* The behavior of the package can be customized via a [[HyperModelingConfig]] supplied to [[initialize]], [[updateConfiguration]], or [[replaceConfiguration]].
|
|
25
|
+
* Hypermodeling mode can be enabled or disabled via [[startOrStop]], which returns a [[HyperModelingDecorator]] when enabling hypermodeling.
|
|
26
|
+
* Consult the package's `README.md` for a description of the available functionality.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare class HyperModeling {
|
|
30
|
+
/** @internal */
|
|
31
|
+
static resources?: Resources;
|
|
32
|
+
private static _markerHandler?;
|
|
33
|
+
private static _markerConfig;
|
|
34
|
+
private static _graphicsConfig;
|
|
35
|
+
private static shutdown;
|
|
36
|
+
/** Returns whether the hypermodeling package is initialized.
|
|
37
|
+
* @see [[HyperModeling.initialize]] to initialize the package.
|
|
38
|
+
*/
|
|
39
|
+
static get isInitialized(): boolean;
|
|
40
|
+
/** Invoke this method to initialize the hypermodeling package for use. You *must* await the result before using any of this package's APIs.
|
|
41
|
+
* Typically an application would invoke this after [IModelApp.startup]($frontend), e.g.,
|
|
42
|
+
* ```ts
|
|
43
|
+
* await IModelApp.startup();
|
|
44
|
+
* await HyperModeling.initialize();
|
|
45
|
+
* ```
|
|
46
|
+
* Calling this method again after the first initialization behaves the same as calling [[HyperModeling.replaceConfiguration]].
|
|
47
|
+
* @note The hypermodeling package will be reset to uninitialized after [IModelApp.shutdown]($frontend) is invoked.
|
|
48
|
+
* @see [[replaceConfiguration]] and [[updateConfiguration]] to modify the configuration after initialization.
|
|
49
|
+
*/
|
|
50
|
+
static initialize(config?: HyperModelingConfig): Promise<void>;
|
|
51
|
+
private static ensureInitialized;
|
|
52
|
+
/** Replaces the current package configuration, overwriting all previous settings. Passing `undefined` resets all settings to defaults.
|
|
53
|
+
* @see [[HyperModeling.updateConfiguration]] for overriding specific aspects of the configuration.
|
|
54
|
+
*/
|
|
55
|
+
static replaceConfiguration(config?: HyperModelingConfig): void;
|
|
56
|
+
/** Overrides specific aspects of the current package configuration. Any field that is not `undefined` will be replaced in the current configuration;
|
|
57
|
+
* the rest will retain their current values.
|
|
58
|
+
* @see [[HyperModeling.replaceConfiguration]].
|
|
59
|
+
*/
|
|
60
|
+
static updateConfiguration(config: HyperModelingConfig): void;
|
|
61
|
+
/** The handler that defines interactions with [[SectionMarker]]s.
|
|
62
|
+
* @see [[initialize]] to override the default handler at package initialization.
|
|
63
|
+
* @see [[updateConfiguration]] or [[replaceConfiguration]] to change the current handler.
|
|
64
|
+
*/
|
|
65
|
+
static get markerHandler(): SectionMarkerHandler;
|
|
66
|
+
/** The current marker display configuration applied to any newly-created [[HyperModelingDecorator]]s.
|
|
67
|
+
* @see [[initialize]] to override the default configuration at package initialization.
|
|
68
|
+
* @see [[updateConfiguration]] or [[replaceConfiguration]] to change the current configuration.
|
|
69
|
+
* @see [[HyperModelingDecorator.replaceConfiguration]] or [[HyperModelingDecorator.updateConfiguration]] to change the configuration for an existing decorator.
|
|
70
|
+
*/
|
|
71
|
+
static get markerConfig(): SectionMarkerConfig;
|
|
72
|
+
/** This graphics options applied to graphics displayed by all [[HyperModelingDecorator]]s.
|
|
73
|
+
* @see [[updateConfiguration]] or [[replaceConfiguration]] to change the current configuration.
|
|
74
|
+
*/
|
|
75
|
+
static get graphicsConfig(): SectionGraphicsConfig;
|
|
76
|
+
/** Returns true if the specified iModel contains any [SectionDrawingLocation]($backend)s. Hypermodeling is based on section drawing locations,
|
|
77
|
+
* so if none are present, hypermodeling features are not relevant to the iModel. Attempting to use those features with such an iModel is fine,
|
|
78
|
+
* but probably not useful.
|
|
79
|
+
*/
|
|
80
|
+
static isSupportedForIModel(imodel: IModelConnection): Promise<boolean>;
|
|
81
|
+
/** Returns whether hypermodeling is currently enabled for the specified viewport.
|
|
82
|
+
* @see [[startOrStop]] to enable or disable hypermodeling for a viewport.
|
|
83
|
+
*/
|
|
84
|
+
static isEnabledForViewport(viewport: ScreenViewport): boolean;
|
|
85
|
+
/** Start or stop hypermodeling mode for the specified viewport.
|
|
86
|
+
* Enabling hypermodeling registers and returns a [[HyperModelingDecorator]] to display [[SectionMarker]]s within the viewport.
|
|
87
|
+
* Disabling hypermodeling removes that decorator.
|
|
88
|
+
* @param viewport The hypermodeling viewport
|
|
89
|
+
* @param start `true` to enter hypermodeling mode, `false` to exit, or `undefined` to toggle the current mode.
|
|
90
|
+
* @returns The new decorator is hypermodeling was successfully enabled.
|
|
91
|
+
* @note Enabling hypermodeling may fail if the viewport is not viewing a spatial model or if the viewport's iModel does not support hypermodeling.
|
|
92
|
+
* @see [[start]] and [[stop]].
|
|
93
|
+
* @see [[isSupportedForIModel]].
|
|
94
|
+
*/
|
|
95
|
+
static startOrStop(viewport: ScreenViewport, start?: boolean): Promise<HyperModelingDecorator | undefined>;
|
|
96
|
+
/** Start hypermodeling mode for the specified viewport if it is not currently enabled.
|
|
97
|
+
* If hypermodeling is already enabled for the viewport, the existing decorator is returned; otherwise, a new decorator is created.
|
|
98
|
+
* @param viewport The viewport for which to enable hypermodeling
|
|
99
|
+
* @returns The decorator that implements hypermodeling features for the viewport, or `undefined` if hypermodeling could not be enabled.
|
|
100
|
+
* @note Enabling hypermodeling may fail if the viewport is not viewing a spatial model or if the viewport's iModel does not support hypermodeling.
|
|
101
|
+
*/
|
|
102
|
+
static start(viewport: ScreenViewport): Promise<HyperModelingDecorator | undefined>;
|
|
103
|
+
private static _start;
|
|
104
|
+
/** Stop hypermodeling mode for the specified viewport if it is currently enabled. This disposes of the [[HyperModelingDecorator]] associated with the viewport.
|
|
105
|
+
* @see [[start]] to enable hypermodeling for a viewport.
|
|
106
|
+
* @see [[startOrStop]] to toggle hypermodeling mode.
|
|
107
|
+
*/
|
|
108
|
+
static stop(viewport: ScreenViewport): void;
|
|
109
|
+
/** @internal */
|
|
110
|
+
static get namespace(): string | undefined;
|
|
111
|
+
/** @internal */
|
|
112
|
+
static getMarkerData(type: SectionType): MarkerData;
|
|
113
|
+
}
|
|
114
|
+
export {};
|
|
115
115
|
//# sourceMappingURL=HyperModeling.d.ts.map
|