@itwin/hypermodeling-frontend 3.7.5 → 3.7.6
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/CHANGELOG.md +6 -1
- package/lib/cjs/HyperModeling.d.ts +114 -114
- package/lib/cjs/HyperModeling.js +240 -240
- 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 +137 -137
- 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 +236 -236
- 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 +133 -133
- 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,111 +1,111 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module HyperModeling
|
|
3
|
-
*/
|
|
4
|
-
import { DecorateContext, Decorator, ScreenViewport } from "@itwin/core-frontend";
|
|
5
|
-
import { SectionMarker, SectionMarkerSet } from "./SectionMarkers";
|
|
6
|
-
import { SectionMarkerConfig } from "./HyperModelingConfig";
|
|
7
|
-
/** A [Decorator]($frontend) that displays a [[SectionMarker]] for each [SectionDrawingLocation]($backend) in the view.
|
|
8
|
-
* Clicking on a marker toggles the section and the display of associated 2d graphics.
|
|
9
|
-
* Hovering over a marker opens a mini toolbar with additional interactions.
|
|
10
|
-
* @see [[SectionMarkerHandler]] to customize the marker interactions.
|
|
11
|
-
* @see [[HyperModeling.startOrStop]] to enable or disable the decorator for a viewport.
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
export declare class HyperModelingDecorator implements Decorator {
|
|
15
|
-
/** The set of [[SectionMarker]]s controlled by this decorator. */
|
|
16
|
-
readonly markers: SectionMarkerSet;
|
|
17
|
-
private _config;
|
|
18
|
-
private readonly _removeEventListeners;
|
|
19
|
-
private readonly _iModel;
|
|
20
|
-
private _needSync;
|
|
21
|
-
private _toolbarProvider?;
|
|
22
|
-
private _tiledGraphicsProvider?;
|
|
23
|
-
private _activeMarker?;
|
|
24
|
-
private _appliedSpatialView?;
|
|
25
|
-
/** @internal */
|
|
26
|
-
syncImmediately: boolean;
|
|
27
|
-
/** Create a new decorator and register it with the [ViewManager]($frontend). Typically invoked indirectly via [[HyperModeling.startOrStop]]. */
|
|
28
|
-
static create(vp: ScreenViewport, config: SectionMarkerConfig): Promise<HyperModelingDecorator | undefined>;
|
|
29
|
-
/** Obtain the decorator associated with the specified viewport, if any. */
|
|
30
|
-
static getForViewport(vp: ScreenViewport): HyperModelingDecorator | undefined;
|
|
31
|
-
/** The viewport into which this decorator draws its [[SectionMarker]]s. */
|
|
32
|
-
get viewport(): ScreenViewport;
|
|
33
|
-
/** The currently active marker. A marker typically becomes active when the user clicks on it.
|
|
34
|
-
* @see [[setActiveMarker]] to change the active marker without user interaction.
|
|
35
|
-
*/
|
|
36
|
-
get activeMarker(): SectionMarker | undefined;
|
|
37
|
-
/** @internal */
|
|
38
|
-
get config(): SectionMarkerConfig;
|
|
39
|
-
/** Replaces the current marker display configuration, overwriting all previous settings. Passing `undefined` resets all settings to defaults.
|
|
40
|
-
* @see [[updateConfiguration]] to override specific aspects of the configuration
|
|
41
|
-
* @see [[HyperModeling.replaceConfiguration]] to replace the global configuration.
|
|
42
|
-
*/
|
|
43
|
-
replaceConfiguration(config?: SectionMarkerConfig): void;
|
|
44
|
-
/** Overrides specific aspects of the current marker display configuration.
|
|
45
|
-
* Any field that is not `undefined` will be replaced in the current configuration; the rest will retain their current values.
|
|
46
|
-
* @see [[replaceConfiguration]] to override all settings.
|
|
47
|
-
* @see [[HyperModeling.updateConfiguration]] to update the global configuration.
|
|
48
|
-
*/
|
|
49
|
-
updateConfiguration(config: SectionMarkerConfig): void;
|
|
50
|
-
/** Sets the currently active marker. This function is invoked when the user clicks on a marker, but may also be called manually to produce the same result.
|
|
51
|
-
* Changing the active marker first deactivates the currently active marker, if any; then activates the specified marker, if supplied.
|
|
52
|
-
* Returns false if marker activation fails.
|
|
53
|
-
* @see [[activeMarker]] to obtain the currently active section marker.
|
|
54
|
-
* @see [[SectionMarkerHandler.activateMarker]] to control what happens when a marker is activated.
|
|
55
|
-
* @see [[SectionMarkerHandler.deactivateMarker]] to control what happens when a marker is deactivated.
|
|
56
|
-
*/
|
|
57
|
-
setActiveMarker(marker: SectionMarker | undefined): Promise<boolean>;
|
|
58
|
-
/** @internal */
|
|
59
|
-
readonly useCachedDecorations = true;
|
|
60
|
-
/** @internal */
|
|
61
|
-
decorate(context: DecorateContext): void;
|
|
62
|
-
private constructor();
|
|
63
|
-
private onViewportChanged;
|
|
64
|
-
private toggleMarker;
|
|
65
|
-
private dropTiledGraphicsProvider;
|
|
66
|
-
/** @internal */
|
|
67
|
-
dispose(): void;
|
|
68
|
-
private showToolbarAfterTimeout;
|
|
69
|
-
/** Toggles whether the clip volume associated with the specified marker is applied to the view. */
|
|
70
|
-
toggleClipVolume(marker: SectionMarker, enable: boolean): void;
|
|
71
|
-
/** Toggles the specified section marker.
|
|
72
|
-
* Enabling the section applies the frustum and clip volume of the marker's spatial view to the viewport, and displays the 2d section graphics and sheet annotations.
|
|
73
|
-
* Disabling the section disables the clip volume and 2d graphics.
|
|
74
|
-
* @see [[toggleClipVolume]] to toggle only the clip volume.
|
|
75
|
-
* @see [[toggleAttachment]] to toggle only the attachment graphics.
|
|
76
|
-
*/
|
|
77
|
-
toggleSection(marker: SectionMarker, enable: boolean): Promise<boolean>;
|
|
78
|
-
/** Toggles display of 2d section graphics and sheet annotations for the specified marker.
|
|
79
|
-
* @see [[toggleSection]] to apply the spatial view and clip volume in addition to the attachment graphics.
|
|
80
|
-
*/
|
|
81
|
-
toggleAttachment(marker: SectionMarker, enable: boolean): Promise<boolean>;
|
|
82
|
-
/** Aligns the viewport to face the specified marker's section plane. */
|
|
83
|
-
alignView(marker: SectionMarker): void;
|
|
84
|
-
/** Opens the marker's drawing view in the decorator's viewport. Returns false if the drawing view could not be loaded. */
|
|
85
|
-
openSection(marker: SectionMarker): Promise<boolean>;
|
|
86
|
-
/** Opens marker's sheet view in the decorator's viewport and zooms in on the associated [ViewAttachment]($backend). Returns false if no view
|
|
87
|
-
* attachment exists or the sheet view could not be loaded.
|
|
88
|
-
*/
|
|
89
|
-
openSheet(marker: SectionMarker): Promise<boolean>;
|
|
90
|
-
/** Aligns the view to match the frustum of the spatial view associated with the specified marker.
|
|
91
|
-
* @param marker The marker whose spatial view's frustum should be applied.
|
|
92
|
-
* @returns false if the frustum could not be applied, e.g. because the spatial view could not be loaded or the viewport is viewing a 2d model.
|
|
93
|
-
* @see [[alignView]] to align to the *section plane*, which may differ.
|
|
94
|
-
* @see [[toggleSection]] to also apply the clip volume.
|
|
95
|
-
*/
|
|
96
|
-
alignToSpatialView(marker: SectionMarker): Promise<boolean>;
|
|
97
|
-
/** Applies the marker's spatial view - including its clip volume - to the decorator's viewport.
|
|
98
|
-
* Returns false if the spatial view could not be loaded.
|
|
99
|
-
* @see [[toggleSection]].
|
|
100
|
-
* @see [[toggleClipVolume]].
|
|
101
|
-
*/
|
|
102
|
-
applySpatialView(marker: SectionMarker): Promise<boolean>;
|
|
103
|
-
/** Request that the visibility of the section markers be recomputed. It is only necessary to call this if you have overridden [[SectionMarkerHandler.isMarkerVisible]]; if so, you should invoke
|
|
104
|
-
* this method when the criteria governing your `isMarkerVisible` method have changed.
|
|
105
|
-
*/
|
|
106
|
-
requestSync(): void;
|
|
107
|
-
private sync;
|
|
108
|
-
private isMarkerVisible;
|
|
109
|
-
private updateMarkerVisibility;
|
|
110
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module HyperModeling
|
|
3
|
+
*/
|
|
4
|
+
import { DecorateContext, Decorator, ScreenViewport } from "@itwin/core-frontend";
|
|
5
|
+
import { SectionMarker, SectionMarkerSet } from "./SectionMarkers";
|
|
6
|
+
import { SectionMarkerConfig } from "./HyperModelingConfig";
|
|
7
|
+
/** A [Decorator]($frontend) that displays a [[SectionMarker]] for each [SectionDrawingLocation]($backend) in the view.
|
|
8
|
+
* Clicking on a marker toggles the section and the display of associated 2d graphics.
|
|
9
|
+
* Hovering over a marker opens a mini toolbar with additional interactions.
|
|
10
|
+
* @see [[SectionMarkerHandler]] to customize the marker interactions.
|
|
11
|
+
* @see [[HyperModeling.startOrStop]] to enable or disable the decorator for a viewport.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare class HyperModelingDecorator implements Decorator {
|
|
15
|
+
/** The set of [[SectionMarker]]s controlled by this decorator. */
|
|
16
|
+
readonly markers: SectionMarkerSet;
|
|
17
|
+
private _config;
|
|
18
|
+
private readonly _removeEventListeners;
|
|
19
|
+
private readonly _iModel;
|
|
20
|
+
private _needSync;
|
|
21
|
+
private _toolbarProvider?;
|
|
22
|
+
private _tiledGraphicsProvider?;
|
|
23
|
+
private _activeMarker?;
|
|
24
|
+
private _appliedSpatialView?;
|
|
25
|
+
/** @internal */
|
|
26
|
+
syncImmediately: boolean;
|
|
27
|
+
/** Create a new decorator and register it with the [ViewManager]($frontend). Typically invoked indirectly via [[HyperModeling.startOrStop]]. */
|
|
28
|
+
static create(vp: ScreenViewport, config: SectionMarkerConfig): Promise<HyperModelingDecorator | undefined>;
|
|
29
|
+
/** Obtain the decorator associated with the specified viewport, if any. */
|
|
30
|
+
static getForViewport(vp: ScreenViewport): HyperModelingDecorator | undefined;
|
|
31
|
+
/** The viewport into which this decorator draws its [[SectionMarker]]s. */
|
|
32
|
+
get viewport(): ScreenViewport;
|
|
33
|
+
/** The currently active marker. A marker typically becomes active when the user clicks on it.
|
|
34
|
+
* @see [[setActiveMarker]] to change the active marker without user interaction.
|
|
35
|
+
*/
|
|
36
|
+
get activeMarker(): SectionMarker | undefined;
|
|
37
|
+
/** @internal */
|
|
38
|
+
get config(): SectionMarkerConfig;
|
|
39
|
+
/** Replaces the current marker display configuration, overwriting all previous settings. Passing `undefined` resets all settings to defaults.
|
|
40
|
+
* @see [[updateConfiguration]] to override specific aspects of the configuration
|
|
41
|
+
* @see [[HyperModeling.replaceConfiguration]] to replace the global configuration.
|
|
42
|
+
*/
|
|
43
|
+
replaceConfiguration(config?: SectionMarkerConfig): void;
|
|
44
|
+
/** Overrides specific aspects of the current marker display configuration.
|
|
45
|
+
* Any field that is not `undefined` will be replaced in the current configuration; the rest will retain their current values.
|
|
46
|
+
* @see [[replaceConfiguration]] to override all settings.
|
|
47
|
+
* @see [[HyperModeling.updateConfiguration]] to update the global configuration.
|
|
48
|
+
*/
|
|
49
|
+
updateConfiguration(config: SectionMarkerConfig): void;
|
|
50
|
+
/** Sets the currently active marker. This function is invoked when the user clicks on a marker, but may also be called manually to produce the same result.
|
|
51
|
+
* Changing the active marker first deactivates the currently active marker, if any; then activates the specified marker, if supplied.
|
|
52
|
+
* Returns false if marker activation fails.
|
|
53
|
+
* @see [[activeMarker]] to obtain the currently active section marker.
|
|
54
|
+
* @see [[SectionMarkerHandler.activateMarker]] to control what happens when a marker is activated.
|
|
55
|
+
* @see [[SectionMarkerHandler.deactivateMarker]] to control what happens when a marker is deactivated.
|
|
56
|
+
*/
|
|
57
|
+
setActiveMarker(marker: SectionMarker | undefined): Promise<boolean>;
|
|
58
|
+
/** @internal */
|
|
59
|
+
readonly useCachedDecorations = true;
|
|
60
|
+
/** @internal */
|
|
61
|
+
decorate(context: DecorateContext): void;
|
|
62
|
+
private constructor();
|
|
63
|
+
private onViewportChanged;
|
|
64
|
+
private toggleMarker;
|
|
65
|
+
private dropTiledGraphicsProvider;
|
|
66
|
+
/** @internal */
|
|
67
|
+
dispose(): void;
|
|
68
|
+
private showToolbarAfterTimeout;
|
|
69
|
+
/** Toggles whether the clip volume associated with the specified marker is applied to the view. */
|
|
70
|
+
toggleClipVolume(marker: SectionMarker, enable: boolean): void;
|
|
71
|
+
/** Toggles the specified section marker.
|
|
72
|
+
* Enabling the section applies the frustum and clip volume of the marker's spatial view to the viewport, and displays the 2d section graphics and sheet annotations.
|
|
73
|
+
* Disabling the section disables the clip volume and 2d graphics.
|
|
74
|
+
* @see [[toggleClipVolume]] to toggle only the clip volume.
|
|
75
|
+
* @see [[toggleAttachment]] to toggle only the attachment graphics.
|
|
76
|
+
*/
|
|
77
|
+
toggleSection(marker: SectionMarker, enable: boolean): Promise<boolean>;
|
|
78
|
+
/** Toggles display of 2d section graphics and sheet annotations for the specified marker.
|
|
79
|
+
* @see [[toggleSection]] to apply the spatial view and clip volume in addition to the attachment graphics.
|
|
80
|
+
*/
|
|
81
|
+
toggleAttachment(marker: SectionMarker, enable: boolean): Promise<boolean>;
|
|
82
|
+
/** Aligns the viewport to face the specified marker's section plane. */
|
|
83
|
+
alignView(marker: SectionMarker): void;
|
|
84
|
+
/** Opens the marker's drawing view in the decorator's viewport. Returns false if the drawing view could not be loaded. */
|
|
85
|
+
openSection(marker: SectionMarker): Promise<boolean>;
|
|
86
|
+
/** Opens marker's sheet view in the decorator's viewport and zooms in on the associated [ViewAttachment]($backend). Returns false if no view
|
|
87
|
+
* attachment exists or the sheet view could not be loaded.
|
|
88
|
+
*/
|
|
89
|
+
openSheet(marker: SectionMarker): Promise<boolean>;
|
|
90
|
+
/** Aligns the view to match the frustum of the spatial view associated with the specified marker.
|
|
91
|
+
* @param marker The marker whose spatial view's frustum should be applied.
|
|
92
|
+
* @returns false if the frustum could not be applied, e.g. because the spatial view could not be loaded or the viewport is viewing a 2d model.
|
|
93
|
+
* @see [[alignView]] to align to the *section plane*, which may differ.
|
|
94
|
+
* @see [[toggleSection]] to also apply the clip volume.
|
|
95
|
+
*/
|
|
96
|
+
alignToSpatialView(marker: SectionMarker): Promise<boolean>;
|
|
97
|
+
/** Applies the marker's spatial view - including its clip volume - to the decorator's viewport.
|
|
98
|
+
* Returns false if the spatial view could not be loaded.
|
|
99
|
+
* @see [[toggleSection]].
|
|
100
|
+
* @see [[toggleClipVolume]].
|
|
101
|
+
*/
|
|
102
|
+
applySpatialView(marker: SectionMarker): Promise<boolean>;
|
|
103
|
+
/** Request that the visibility of the section markers be recomputed. It is only necessary to call this if you have overridden [[SectionMarkerHandler.isMarkerVisible]]; if so, you should invoke
|
|
104
|
+
* this method when the criteria governing your `isMarkerVisible` method have changed.
|
|
105
|
+
*/
|
|
106
|
+
requestSync(): void;
|
|
107
|
+
private sync;
|
|
108
|
+
private isMarkerVisible;
|
|
109
|
+
private updateMarkerVisibility;
|
|
110
|
+
}
|
|
111
111
|
//# sourceMappingURL=HyperModelingDecorator.d.ts.map
|