@itwin/imodel-components-react 4.0.0-dev.9 → 4.0.1
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 +161 -1
- package/README.md +2 -2
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +28 -28
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +75 -79
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +36 -36
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +190 -186
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +112 -107
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +78 -74
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +143 -137
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -63
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
- package/lib/cjs/imodel-components-react/color/HueSlider.js +203 -199
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +20 -20
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +217 -213
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts +22 -22
- package/lib/cjs/imodel-components-react/color/Swatch.js +64 -60
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -23
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +23 -23
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +44 -44
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js +155 -151
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
- package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts +47 -47
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js +164 -160
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +100 -96
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +272 -265
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js +89 -85
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +163 -159
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
- package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js +131 -127
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +154 -174
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +626 -634
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +657 -647
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +103 -99
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +56 -53
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +88 -83
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +89 -86
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +112 -109
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +133 -133
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +187 -184
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +149 -145
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +63 -59
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +51 -47
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +58 -54
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +52 -48
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +54 -50
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +62 -58
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +51 -47
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +60 -56
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +98 -95
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +123 -119
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +142 -143
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +85 -81
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +99 -91
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -31
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +195 -191
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -112
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +432 -424
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -356
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +58 -54
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
- package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +398 -358
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -164
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +145 -174
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +276 -274
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/cjs/imodel-components-react.d.ts +81 -82
- package/lib/cjs/imodel-components-react.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react.js +104 -101
- package/lib/cjs/imodel-components-react.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js +72 -75
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
- package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +83 -82
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +114 -112
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -63
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
- package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
- package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +20 -20
- package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
- package/lib/esm/imodel-components-react/color/Swatch.d.ts +22 -22
- package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
- package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.scss +22 -23
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
- package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
- package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
- package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +47 -47
- package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
- package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +243 -240
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
- package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
- package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +134 -133
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
- package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
- package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
- package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +154 -174
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +596 -606
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +627 -620
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +29 -30
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +61 -60
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +62 -63
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +82 -83
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +106 -110
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +157 -158
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +122 -122
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +68 -69
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +138 -139
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
- package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
- package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js +68 -64
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -31
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -112
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +402 -398
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -356
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
- package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +368 -332
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -164
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +145 -174
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +249 -251
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +96 -95
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.d.ts +81 -82
- package/lib/esm/imodel-components-react.d.ts.map +1 -1
- package/lib/esm/imodel-components-react.js +86 -87
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +139 -139
- package/package.json +35 -37
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +0 -146
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +0 -94
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +0 -123
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +0 -94
|
@@ -1,648 +1,658 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module NavigationAids
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
};
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
};
|
|
171
|
-
this.
|
|
172
|
-
const
|
|
173
|
-
this.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
this.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
this.
|
|
192
|
-
if
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
};
|
|
197
|
-
this.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
this.
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
this.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
if (
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
if (this.
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
const
|
|
313
|
-
const
|
|
314
|
-
this.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
const
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
const
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
const
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
React.createElement("div", { className: "
|
|
470
|
-
React.createElement(
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
window.
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
this.
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
const
|
|
570
|
-
const
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module NavigationAids
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DrawingNavigationCanvas = exports.DrawingNavigationAid = exports.MapMode = void 0;
|
|
37
|
+
require("./DrawingNavigationAid.scss");
|
|
38
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
39
|
+
const React = __importStar(require("react"));
|
|
40
|
+
const ReactDOM = __importStar(require("react-dom"));
|
|
41
|
+
const core_geometry_1 = require("@itwin/core-geometry");
|
|
42
|
+
const core_frontend_1 = require("@itwin/core-frontend");
|
|
43
|
+
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
44
|
+
const core_react_1 = require("@itwin/core-react");
|
|
45
|
+
const UiIModelComponents_1 = require("../UiIModelComponents");
|
|
46
|
+
const ViewportComponentEvents_1 = require("../viewport/ViewportComponentEvents");
|
|
47
|
+
const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
|
|
48
|
+
// cSpell:ignore Quaternion Quaternions unrotate
|
|
49
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
50
|
+
/**
|
|
51
|
+
* Enum for mode that minimap is currently in
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
var MapMode;
|
|
55
|
+
(function (MapMode) {
|
|
56
|
+
MapMode["Opened"] = "map-opened";
|
|
57
|
+
MapMode["Closed"] = "map-closed";
|
|
58
|
+
})(MapMode = exports.MapMode || (exports.MapMode = {}));
|
|
59
|
+
/**
|
|
60
|
+
* A Drawing Navigation Aid.
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
class DrawingNavigationAid extends React.Component {
|
|
64
|
+
constructor(props) {
|
|
65
|
+
super(props);
|
|
66
|
+
this._rootElement = React.createRef();
|
|
67
|
+
this._viewContainerElement = React.createRef();
|
|
68
|
+
this._viewElement = React.createRef();
|
|
69
|
+
this._rootOffset = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0 });
|
|
70
|
+
this._mounted = false;
|
|
71
|
+
this._isViewport3D = () => {
|
|
72
|
+
return this.state.view !== undefined && this.state.view.is3d();
|
|
73
|
+
};
|
|
74
|
+
this._animation = () => {
|
|
75
|
+
const t = Date.now();
|
|
76
|
+
const delta = this._lastTime ? t - this._lastTime : 16;
|
|
77
|
+
this._lastTime = t;
|
|
78
|
+
if (this.state.animation !== 1) {
|
|
79
|
+
const animation = Math.min(1, this.state.animation + delta / (1000 * (this.props.animationTime || 0.4)));
|
|
80
|
+
this._updateFrustum();
|
|
81
|
+
// istanbul ignore next
|
|
82
|
+
if (this._mounted) {
|
|
83
|
+
this.setState({ animation }, () => {
|
|
84
|
+
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this._lastTime = undefined;
|
|
90
|
+
this._animationEnd();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
this._animationEnd = () => {
|
|
94
|
+
const hasViewportMoved = !this.state.origin.isAlmostEqual(this.state.startOrigin) ||
|
|
95
|
+
!this.state.rotation.isAlmostEqual(this.state.startRotation);
|
|
96
|
+
const startMapOrigin = core_geometry_1.Point3d.createFrom(this.state.mapOrigin);
|
|
97
|
+
const startMapExtents = core_geometry_1.Vector3d.createFrom(this.state.mapExtents);
|
|
98
|
+
const startDrawingZoom = this.state.drawingZoom;
|
|
99
|
+
const startOrigin = this.state.origin;
|
|
100
|
+
const startRotation = this.state.rotation;
|
|
101
|
+
// istanbul ignore next
|
|
102
|
+
if (this._mounted) {
|
|
103
|
+
this.setState({ startMapOrigin, startDrawingZoom, startOrigin, startRotation, startMapExtents }, () => {
|
|
104
|
+
// istanbul ignore else
|
|
105
|
+
if (this.props.onAnimationEnd)
|
|
106
|
+
this.props.onAnimationEnd();
|
|
107
|
+
if (hasViewportMoved)
|
|
108
|
+
this._updateFrustum(true);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
this._panAnimation = () => {
|
|
113
|
+
const t = Date.now();
|
|
114
|
+
if (this._lastPanTime === undefined)
|
|
115
|
+
this._lastPanTime = t - 16.667;
|
|
116
|
+
const delta = t - this._lastPanTime;
|
|
117
|
+
this._lastPanTime = t;
|
|
118
|
+
// istanbul ignore else
|
|
119
|
+
if (!this.state.panningDirection.isAlmostZero && this.state.isMoving) {
|
|
120
|
+
const { panningDirection } = this.state;
|
|
121
|
+
const offset = panningDirection.scale(delta / 1000 / this.state.drawingZoom);
|
|
122
|
+
const mapOrigin = this.state.mapOrigin.plus(offset);
|
|
123
|
+
const origin = this.state.origin.plus(offset);
|
|
124
|
+
this._updateFrustum();
|
|
125
|
+
// istanbul ignore next
|
|
126
|
+
if (this._mounted) {
|
|
127
|
+
this.setState({ mapOrigin, origin, panningDirection }, () => {
|
|
128
|
+
this._animationFrame = setTimeout(this._panAnimation, 16.667);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this._lastPanTime = undefined;
|
|
134
|
+
this._updateFrustum(true);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
// Synchronize with rotation coming from the Viewport
|
|
138
|
+
this._handleViewRotationChangeEvent = (args) => {
|
|
139
|
+
// istanbul ignore else
|
|
140
|
+
if (!this.state.isMoving && !this.state.isPanning && this.props.viewport === args.viewport) {
|
|
141
|
+
const extents = args.viewport.view.getExtents().clone();
|
|
142
|
+
const rotation = args.viewport.view.getRotation().clone();
|
|
143
|
+
const halfExtents = extents.scale(.5);
|
|
144
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? rotation.multiplyTransposeVector(halfExtents) : halfExtents;
|
|
145
|
+
const origin = args.viewport.view.getOrigin().plus(offset);
|
|
146
|
+
const deltaZoom = (this.state.extents.x - extents.x) / this.state.extents.x;
|
|
147
|
+
let drawingZoom = this.state.drawingZoom / (1 - deltaZoom);
|
|
148
|
+
const deltaOrigin = origin.minus(this.state.origin);
|
|
149
|
+
let mapOrigin = this.state.mapOrigin.plus(deltaOrigin);
|
|
150
|
+
mapOrigin = mapOrigin.plus(core_geometry_1.Vector3d.createFrom(origin.minus(mapOrigin)).scale(deltaZoom));
|
|
151
|
+
if (this.state.viewId !== args.viewport.view.id) {
|
|
152
|
+
const rect = this.state.rotateMinimapWithView || this._isViewport3D() ? extents : DrawingNavigationAid.findRotatedWindowDimensions(extents, rotation);
|
|
153
|
+
const maxRectDim = Math.max(rect.y, rect.x);
|
|
154
|
+
const maxExtentDim = Math.max(this.state.mapExtents.x, this.state.mapExtents.y);
|
|
155
|
+
drawingZoom = maxExtentDim / (3 * maxRectDim);
|
|
156
|
+
mapOrigin = origin.clone();
|
|
157
|
+
this._viewport = args.viewport;
|
|
158
|
+
this.setState({ viewId: args.viewport.view.id, view: args.viewport.view.clone() });
|
|
159
|
+
}
|
|
160
|
+
// istanbul ignore next
|
|
161
|
+
if (this._mounted) {
|
|
162
|
+
this.setState({
|
|
163
|
+
startOrigin: origin, origin, extents,
|
|
164
|
+
startRotation: rotation, rotation,
|
|
165
|
+
startMapOrigin: mapOrigin, mapOrigin,
|
|
166
|
+
startDrawingZoom: drawingZoom, drawingZoom,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
this._updateFrustum = (complete = false) => {
|
|
172
|
+
const halfExtents = this.state.extents.scale(.5);
|
|
173
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(halfExtents) : halfExtents;
|
|
174
|
+
const origin = this.state.origin.minus(offset);
|
|
175
|
+
ViewportComponentEvents_1.ViewportComponentEvents.setDrawingViewportState(origin, this.state.rotation, complete);
|
|
176
|
+
};
|
|
177
|
+
this._toggleRotationMode = () => {
|
|
178
|
+
const rotateMinimapWithView = !this.state.rotateMinimapWithView;
|
|
179
|
+
this.setState({ rotateMinimapWithView }, () => {
|
|
180
|
+
if (this._viewport)
|
|
181
|
+
this._handleViewRotationChangeEvent({ viewport: this._viewport });
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
this._handleKeyUp = (event) => {
|
|
185
|
+
// istanbul ignore else
|
|
186
|
+
if (event.key === appui_abstract_1.SpecialKey.Escape && this.state.mode === MapMode.Opened) {
|
|
187
|
+
this._closeLargeMap();
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
this._lastClientXY = core_geometry_1.Point2d.createZero();
|
|
191
|
+
this._handleMouseDown = (event) => {
|
|
192
|
+
// Used only to determine if mouse was moved between mousedown and mouseup
|
|
193
|
+
const mouseStart = core_geometry_1.Point2d.create(event.clientX, event.clientY);
|
|
194
|
+
this.setState({ mouseStart });
|
|
195
|
+
this._lastClientXY = core_geometry_1.Point2d.create(event.clientX, event.clientY);
|
|
196
|
+
};
|
|
197
|
+
this._handleDrawingMouseDown = (event) => {
|
|
198
|
+
if (this.state.mode === MapMode.Opened) {
|
|
199
|
+
event.preventDefault();
|
|
200
|
+
this.setState({ isPanning: true });
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
this._handleWindowMouseDown = (event) => {
|
|
204
|
+
event.preventDefault();
|
|
205
|
+
this.setState({ isMoving: true });
|
|
206
|
+
};
|
|
207
|
+
this._handleMouseDrag = (event) => {
|
|
208
|
+
const mouse = core_geometry_1.Point2d.create(event.clientX, event.clientY);
|
|
209
|
+
const movement = mouse.minus(this._lastClientXY);
|
|
210
|
+
if (this.state.isMoving) {
|
|
211
|
+
// add scaled mouse movement
|
|
212
|
+
this._processWindowDrag(movement);
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
// istanbul ignore else
|
|
216
|
+
if (this.state.isPanning && this.state.mode === MapMode.Opened) {
|
|
217
|
+
const vect = core_geometry_1.Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
|
|
218
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(vect) : vect;
|
|
219
|
+
const mapOrigin = this.state.mapOrigin.minus(offset);
|
|
220
|
+
this.setState({ startMapOrigin: mapOrigin, mapOrigin });
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
this._lastClientXY = mouse;
|
|
224
|
+
};
|
|
225
|
+
this._handleMouseDragEnd = (event) => {
|
|
226
|
+
const mouse = core_geometry_1.Point2d.create(event.clientX, event.clientY);
|
|
227
|
+
if (mouse.isAlmostEqual(this.state.mouseStart) &&
|
|
228
|
+
this.state.mode === MapMode.Closed &&
|
|
229
|
+
(event.target === this._viewContainerElement.current || event.target === this._viewElement.current)) {
|
|
230
|
+
this._openLargeMap();
|
|
231
|
+
}
|
|
232
|
+
else if (this.state.isMoving) {
|
|
233
|
+
this._processWindowEndDrag();
|
|
234
|
+
}
|
|
235
|
+
else if (this.state.isPanning) {
|
|
236
|
+
// istanbul ignore else
|
|
237
|
+
if (this.state.mode === MapMode.Opened) {
|
|
238
|
+
event.stopPropagation();
|
|
239
|
+
this.setState({ isPanning: false });
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
else if ((!(event.target instanceof Node) || this._rootElement.current && !this._rootElement.current.contains(event.target)) && mouse.isAlmostEqual(this.state.mouseStart)) {
|
|
243
|
+
this._closeLargeMap();
|
|
244
|
+
}
|
|
245
|
+
this._lastClientXY = core_geometry_1.Point2d.create(event.clientX, event.clientY);
|
|
246
|
+
};
|
|
247
|
+
// istanbul ignore next - unable to test touch
|
|
248
|
+
this._handleWindowTouchStart = (event) => {
|
|
249
|
+
if (1 !== event.targetTouches.length)
|
|
250
|
+
return;
|
|
251
|
+
window.addEventListener("touchmove", this._onTouchMove, false);
|
|
252
|
+
window.addEventListener("touchend", this._onTouchEnd, false);
|
|
253
|
+
const mouseStart = core_geometry_1.Point2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);
|
|
254
|
+
this.setState({ mouseStart });
|
|
255
|
+
this._lastClientXY = mouseStart.clone();
|
|
256
|
+
this.setState({ isMoving: true });
|
|
257
|
+
};
|
|
258
|
+
// istanbul ignore next - unable to test touch
|
|
259
|
+
this._onTouchMove = (event) => {
|
|
260
|
+
if (1 !== event.targetTouches.length)
|
|
261
|
+
return;
|
|
262
|
+
const mouse = core_geometry_1.Point2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);
|
|
263
|
+
const movement = mouse.minus(this._lastClientXY);
|
|
264
|
+
// add scaled mouse movement
|
|
265
|
+
this._processWindowDrag(movement);
|
|
266
|
+
this._lastClientXY = mouse;
|
|
267
|
+
};
|
|
268
|
+
// istanbul ignore next - unable to test touch
|
|
269
|
+
this._onTouchEnd = (event) => {
|
|
270
|
+
if (0 !== event.targetTouches.length)
|
|
271
|
+
return;
|
|
272
|
+
this._processWindowEndDrag();
|
|
273
|
+
if (0 !== event.changedTouches.length)
|
|
274
|
+
this._lastClientXY = core_geometry_1.Point2d.create(event.changedTouches[0].clientX, event.changedTouches[0].clientY); // Doesn't seem necessary...but _handleMouseDragEnd sets it...
|
|
275
|
+
window.removeEventListener("touchmove", this._onTouchMove);
|
|
276
|
+
window.removeEventListener("touchend", this._onTouchEnd);
|
|
277
|
+
};
|
|
278
|
+
this._getClosedMapSize = () => {
|
|
279
|
+
if (this.props.closeSize === undefined)
|
|
280
|
+
return DrawingNavigationAid.getDefaultClosedMapSize();
|
|
281
|
+
return this.props.closeSize;
|
|
282
|
+
};
|
|
283
|
+
this._getOpenedMapSize = () => {
|
|
284
|
+
if (this.props.openSize === undefined)
|
|
285
|
+
return DrawingNavigationAid.getDefaultOpenedMapSize(this._rootOffset.right, this._rootOffset.top);
|
|
286
|
+
return this.props.openSize;
|
|
287
|
+
};
|
|
288
|
+
this._openLargeMap = () => {
|
|
289
|
+
// istanbul ignore else
|
|
290
|
+
if (this.state.mode === MapMode.Closed && this.state.animation === 1.0) {
|
|
291
|
+
// istanbul ignore else
|
|
292
|
+
if (this._rootElement.current) {
|
|
293
|
+
const rect = this._rootElement.current.getBoundingClientRect();
|
|
294
|
+
this._rootOffset = rect;
|
|
295
|
+
}
|
|
296
|
+
const startMapExtents = core_geometry_1.Vector3d.createFrom(this.state.mapExtents);
|
|
297
|
+
const mapExtents = this._getOpenedMapSize();
|
|
298
|
+
this.setState({
|
|
299
|
+
mode: MapMode.Opened,
|
|
300
|
+
isMoving: false, isPanning: false,
|
|
301
|
+
mapExtents, startMapExtents,
|
|
302
|
+
animation: 0,
|
|
303
|
+
}, () => {
|
|
304
|
+
this._animationFrame = setTimeout(this._animation);
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
this._closeLargeMap = () => {
|
|
309
|
+
// istanbul ignore else
|
|
310
|
+
if (this.state.mode === MapMode.Opened && this.state.animation === 1.0) {
|
|
311
|
+
const startMapOrigin = this.state.mapOrigin;
|
|
312
|
+
const mapOrigin = this.state.origin.clone();
|
|
313
|
+
const startMapExtents = core_geometry_1.Vector3d.createFrom(this.state.mapExtents);
|
|
314
|
+
const mapExtents = this._getClosedMapSize();
|
|
315
|
+
const rect = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.extents : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
|
|
316
|
+
const maxRectDim = Math.max(rect.y, rect.x);
|
|
317
|
+
const maxExtentDim = Math.max(mapExtents.x, mapExtents.y);
|
|
318
|
+
const drawingZoom = maxExtentDim / (3 * maxRectDim);
|
|
319
|
+
const startDrawingZoom = this.state.drawingZoom;
|
|
320
|
+
this.setState({
|
|
321
|
+
mode: MapMode.Closed,
|
|
322
|
+
startMapOrigin, mapOrigin,
|
|
323
|
+
startDrawingZoom, drawingZoom,
|
|
324
|
+
isMoving: false, isPanning: false,
|
|
325
|
+
startMapExtents, mapExtents,
|
|
326
|
+
panningDirection: core_geometry_1.Vector3d.createZero(),
|
|
327
|
+
animation: 0,
|
|
328
|
+
}, () => {
|
|
329
|
+
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
this._getPanVector = () => {
|
|
334
|
+
const is3D = this._isViewport3D();
|
|
335
|
+
const rect = this.state.rotateMinimapWithView || is3D ? this.state.extents : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
|
|
336
|
+
const mapExtents = this.state.mapExtents.scale(1 / this.state.drawingZoom);
|
|
337
|
+
const maxMagnitude = 80; // maximum acceleration
|
|
338
|
+
const magnitudeTravel = 30; // How far, in pixels, that magnitude increases from 0 to max acceleration
|
|
339
|
+
const diff = core_geometry_1.Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin));
|
|
340
|
+
const diffVector = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyVector(diff) : diff;
|
|
341
|
+
// capture any values
|
|
342
|
+
const magnitudeVector = core_geometry_1.Vector3d.create(Math.max(0, Math.abs(diffVector.x) - (mapExtents.x - rect.x) / 2), Math.max(0, Math.abs(diffVector.y) - (mapExtents.y - rect.y) / 2));
|
|
343
|
+
if (magnitudeVector.isAlmostZero)
|
|
344
|
+
return core_geometry_1.Vector3d.createZero();
|
|
345
|
+
const magnitude = Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) / magnitudeTravel * maxMagnitude;
|
|
346
|
+
const vect = core_geometry_1.Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin)); // vect will never be zero or magnitude would also be zero
|
|
347
|
+
const norm = vect.normalize();
|
|
348
|
+
return norm.scale(magnitude); // norm is only undefined when vect is zero, in which it would have returned at magnitudeVector.isAlmostZero
|
|
349
|
+
};
|
|
350
|
+
this._handleWheel = (event) => {
|
|
351
|
+
// istanbul ignore else
|
|
352
|
+
if (this.state.mode === MapMode.Opened && this.state.animation === 1) {
|
|
353
|
+
const { mapOrigin, drawingZoom } = this.state;
|
|
354
|
+
const mapSize = this._getOpenedMapSize();
|
|
355
|
+
const mouseX = event.clientX - this._rootOffset.right + mapSize.x / 2;
|
|
356
|
+
const mouseY = event.clientY - this._rootOffset.top - mapSize.y / 2;
|
|
357
|
+
const is3D = this._isViewport3D();
|
|
358
|
+
if (event.deltaY < 0) {
|
|
359
|
+
const zoom = drawingZoom * 1.1;
|
|
360
|
+
const vect = core_geometry_1.Vector3d.create(mouseX * 0.1 / zoom, -mouseY * 0.1 / zoom, 0);
|
|
361
|
+
const offset = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyTransposeVector(vect) : vect;
|
|
362
|
+
const m = mapOrigin.plus(offset);
|
|
363
|
+
this.setState({ mapOrigin: m, drawingZoom: zoom });
|
|
364
|
+
}
|
|
365
|
+
if (event.deltaY > 0) {
|
|
366
|
+
const zoom = drawingZoom / 1.1;
|
|
367
|
+
const vect = core_geometry_1.Vector3d.create(mouseX * 0.1 / drawingZoom, -mouseY * 0.1 / drawingZoom, 0);
|
|
368
|
+
const offset = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyTransposeVector(vect) : vect;
|
|
369
|
+
const m = mapOrigin.minus(offset);
|
|
370
|
+
this.setState({ mapOrigin: m, drawingZoom: zoom });
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
this._handleZoomIn = () => {
|
|
375
|
+
const zoom = this.state.drawingZoom * 1.4;
|
|
376
|
+
this.setState({ drawingZoom: zoom });
|
|
377
|
+
};
|
|
378
|
+
this._handleZoomOut = () => {
|
|
379
|
+
const zoom = this.state.drawingZoom / 1.4;
|
|
380
|
+
this.setState({ drawingZoom: zoom });
|
|
381
|
+
};
|
|
382
|
+
this._handleUnrotate = () => {
|
|
383
|
+
const startRotation = this.state.rotation;
|
|
384
|
+
const halfExtents = this.state.extents.scale(.5);
|
|
385
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? core_geometry_1.Vector3d.createZero() : this.state.rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
|
|
386
|
+
const startOrigin = this.state.origin;
|
|
387
|
+
const origin = this.state.origin.plus(offset);
|
|
388
|
+
const startMapOrigin = this.state.mapOrigin;
|
|
389
|
+
const mapOrigin = this.state.mapOrigin.plus(offset);
|
|
390
|
+
this.setState({ animation: 0, startOrigin, origin, startMapOrigin, mapOrigin, startRotation, rotation: core_geometry_1.Matrix3d.createIdentity() }, () => {
|
|
391
|
+
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
392
|
+
});
|
|
393
|
+
};
|
|
394
|
+
const mode = props.initialMapMode || MapMode.Closed;
|
|
395
|
+
const mapExtents = mode === MapMode.Closed ? this._getClosedMapSize() : this._getOpenedMapSize();
|
|
396
|
+
const startMapExtents = mapExtents;
|
|
397
|
+
this.state = {
|
|
398
|
+
startOrigin: core_geometry_1.Point3d.createZero(),
|
|
399
|
+
origin: core_geometry_1.Point3d.createZero(),
|
|
400
|
+
extents: core_geometry_1.Vector3d.create(1, 1, 1),
|
|
401
|
+
startRotation: core_geometry_1.Matrix3d.createIdentity(),
|
|
402
|
+
rotation: core_geometry_1.Matrix3d.createIdentity(),
|
|
403
|
+
startMapOrigin: core_geometry_1.Point3d.createZero(),
|
|
404
|
+
mapOrigin: core_geometry_1.Point3d.createZero(),
|
|
405
|
+
startMapExtents,
|
|
406
|
+
mapExtents,
|
|
407
|
+
mouseStart: core_geometry_1.Point2d.createZero(),
|
|
408
|
+
panningDirection: core_geometry_1.Vector3d.createZero(),
|
|
409
|
+
startDrawingZoom: 1.0,
|
|
410
|
+
drawingZoom: 1.0,
|
|
411
|
+
mode,
|
|
412
|
+
animation: 1.0,
|
|
413
|
+
viewId: props.initialView !== undefined ? props.initialView.id : "",
|
|
414
|
+
view: props.initialView,
|
|
415
|
+
isMoving: false,
|
|
416
|
+
isPanning: false,
|
|
417
|
+
rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined ? props.initialRotateMinimapWithView : false,
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
/** @internal */
|
|
421
|
+
render() {
|
|
422
|
+
const { startOrigin, origin, extents, startRotation, rotation, startMapOrigin, mapOrigin, startMapExtents, mapExtents, startDrawingZoom, drawingZoom, animation, viewId, mode, rotateMinimapWithView, } = this.state;
|
|
423
|
+
const a = DrawingNavigationAid._animationFn(animation);
|
|
424
|
+
const rot = core_geometry_1.Matrix3d.createFromQuaternion(core_geometry_1.Point4d.interpolateQuaternions(startRotation.toQuaternion(), a, rotation.toQuaternion()));
|
|
425
|
+
const or = startOrigin.interpolate(a, origin);
|
|
426
|
+
const map = startMapOrigin.interpolate(a, mapOrigin);
|
|
427
|
+
const sz = startMapExtents.interpolate(a, mapExtents);
|
|
428
|
+
const dz = core_geometry_1.Geometry.interpolate(startDrawingZoom, a, drawingZoom);
|
|
429
|
+
const rootStyle = {
|
|
430
|
+
width: sz.x, height: sz.y,
|
|
431
|
+
...this.props.style,
|
|
432
|
+
};
|
|
433
|
+
const is3D = this._isViewport3D();
|
|
434
|
+
const tOr = rotateMinimapWithView || is3D ? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(or)) : core_geometry_1.Vector3d.createFrom(or);
|
|
435
|
+
const tMap = rotateMinimapWithView || is3D ? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(map)) : core_geometry_1.Vector3d.createFrom(map);
|
|
436
|
+
const tPosX = (tOr.x - extents.x / 2 - tMap.x) * dz + sz.x / 2;
|
|
437
|
+
const tPosY = (-tOr.y - extents.y / 2 + tMap.y) * dz + sz.y / 2;
|
|
438
|
+
const viewWindowStyle = {
|
|
439
|
+
transform: `translate(${tPosX}px, ${tPosY}px)`,
|
|
440
|
+
height: extents.y * dz,
|
|
441
|
+
width: extents.x * dz,
|
|
442
|
+
};
|
|
443
|
+
if (!rotateMinimapWithView && !is3D)
|
|
444
|
+
viewWindowStyle.transform =
|
|
445
|
+
"matrix3d(" +
|
|
446
|
+
`${rot.at(0, 0)}, ${rot.at(1, 0)}, ${rot.at(2, 0)}, 0, ` +
|
|
447
|
+
`${rot.at(0, 1)}, ${rot.at(1, 1)}, ${rot.at(2, 1)}, 0, ` +
|
|
448
|
+
`${rot.at(0, 2)}, ${rot.at(1, 2)}, ${rot.at(2, 2)}, 0, ` +
|
|
449
|
+
`${tPosX}, ${tPosY}, 0, 1)`;
|
|
450
|
+
const isAnimating = animation !== 1 && !startMapExtents.isExactEqual(mapExtents);
|
|
451
|
+
if (mode === MapMode.Opened || isAnimating) {
|
|
452
|
+
rootStyle.position = "fixed";
|
|
453
|
+
rootStyle.right = window.innerWidth - this._rootOffset.right;
|
|
454
|
+
rootStyle.top = this._rootOffset.top;
|
|
455
|
+
}
|
|
456
|
+
const halfExtents = extents.scale(.5);
|
|
457
|
+
const offset = rotateMinimapWithView || is3D ? core_geometry_1.Vector3d.createZero() : rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
|
|
458
|
+
const unrotateLabel = UiIModelComponents_1.UiIModelComponents.translate("drawing.unrotate");
|
|
459
|
+
const e = sz.scale(1 / dz);
|
|
460
|
+
const halfMapExtents = e.scale(.5);
|
|
461
|
+
const mapOffset = rotateMinimapWithView || is3D ? rotation.multiplyTransposeVector(halfMapExtents) : halfMapExtents;
|
|
462
|
+
const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
463
|
+
const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
|
|
464
|
+
const nodes = (React.createElement("div", { className: (0, classnames_1.default)("components-drawing-navigation-aid", this.props.className), "data-testid": "components-drawing-navigation-aid", ref: this._rootElement, onWheel: this._handleWheel, onMouseDown: this._handleDrawingMouseDown, style: rootStyle, role: "presentation" },
|
|
465
|
+
React.createElement(DrawingNavigationCanvas, { view: this.state.view, viewManagerOverride: viewManager, screenViewportOverride: screenViewport, viewId: viewId, origin: map.plus(offset).minus(mapOffset), extents: e, zoom: dz, rotation: rotateMinimapWithView || is3D ? rotation : core_geometry_1.Matrix3d.createIdentity() }),
|
|
466
|
+
React.createElement("div", { className: "drawing-container", "data-testid": "drawing-container", ref: this._viewContainerElement },
|
|
467
|
+
React.createElement("div", { className: "drawing-view-window", "data-testid": "drawing-view-window", onMouseDown: this._handleWindowMouseDown, onTouchStart: this._handleWindowTouchStart, style: viewWindowStyle, ref: this._viewElement, role: "presentation" }),
|
|
468
|
+
!is3D &&
|
|
469
|
+
React.createElement("div", { className: (0, classnames_1.default)("toggle-rotate-style", "icon", { checked: rotateMinimapWithView }), "data-testid": "toggle-rotate-style", style: mode === MapMode.Closed && !isAnimating ? { bottom: 2, left: 2 } : {}, title: UiIModelComponents_1.UiIModelComponents.translate("drawing.rotateStyle"), onClick: this._toggleRotationMode, role: "presentation" },
|
|
470
|
+
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRotateLeft, null) })),
|
|
471
|
+
!rot.isIdentity &&
|
|
472
|
+
React.createElement("div", { className: "unrotate-button", "data-testid": "drawing-unrotate-button", style: mode === MapMode.Closed && !isAnimating ? { top: 2 } : {}, onClick: this._handleUnrotate, role: "button", tabIndex: -1 }, unrotateLabel),
|
|
473
|
+
mode === MapMode.Opened && !isAnimating && React.createElement(React.Fragment, null,
|
|
474
|
+
React.createElement("div", { className: "close", "data-testid": "drawing-close-button", onClick: this._closeLargeMap, role: "button", tabIndex: -1 },
|
|
475
|
+
React.createElement("div", { className: "close-icon icon" },
|
|
476
|
+
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgSortUp, null) }))),
|
|
477
|
+
React.createElement("div", { className: "zoom" },
|
|
478
|
+
React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-in-button", onClick: this._handleZoomIn, role: "button", tabIndex: -1 },
|
|
479
|
+
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgAdd, null) })),
|
|
480
|
+
React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-out-button", onClick: this._handleZoomOut, role: "button", tabIndex: -1 },
|
|
481
|
+
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRemove, null) })))))));
|
|
482
|
+
if (mode === MapMode.Closed && (animation === 1.0 || startMapExtents.isExactEqual(mapExtents))) {
|
|
483
|
+
return nodes;
|
|
484
|
+
}
|
|
485
|
+
else {
|
|
486
|
+
let drawingPortal = document.querySelector("#components-drawing-portal");
|
|
487
|
+
if (!drawingPortal) {
|
|
488
|
+
drawingPortal = document.createElement("div");
|
|
489
|
+
drawingPortal.id = "components-drawing-portal";
|
|
490
|
+
document.body.appendChild(drawingPortal);
|
|
491
|
+
}
|
|
492
|
+
return ReactDOM.createPortal(nodes, drawingPortal);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
componentDidMount() {
|
|
496
|
+
this._mounted = true;
|
|
497
|
+
ViewportComponentEvents_1.ViewportComponentEvents.onViewRotationChangeEvent.addListener(this._handleViewRotationChangeEvent);
|
|
498
|
+
window.addEventListener("mousedown", this._handleMouseDown);
|
|
499
|
+
window.addEventListener("mouseup", this._handleMouseDragEnd);
|
|
500
|
+
window.addEventListener("mousemove", this._handleMouseDrag);
|
|
501
|
+
window.addEventListener("keyup", this._handleKeyUp);
|
|
502
|
+
}
|
|
503
|
+
componentWillUnmount() {
|
|
504
|
+
ViewportComponentEvents_1.ViewportComponentEvents.onViewRotationChangeEvent.removeListener(this._handleViewRotationChangeEvent);
|
|
505
|
+
window.removeEventListener("mousedown", this._handleMouseDown);
|
|
506
|
+
window.removeEventListener("mouseup", this._handleMouseDragEnd);
|
|
507
|
+
window.removeEventListener("mousemove", this._handleMouseDrag);
|
|
508
|
+
window.removeEventListener("keyup", this._handleKeyUp);
|
|
509
|
+
clearTimeout(this._animationFrame);
|
|
510
|
+
if (this.props.onAnimationEnd)
|
|
511
|
+
this.props.onAnimationEnd();
|
|
512
|
+
const rt = document.getElementById("components-drawing-portal");
|
|
513
|
+
if (rt && rt.parentElement !== null && rt.children.length === 0) {
|
|
514
|
+
rt.parentElement.removeChild(rt);
|
|
515
|
+
}
|
|
516
|
+
this._mounted = false;
|
|
517
|
+
}
|
|
518
|
+
_processWindowDrag(movement) {
|
|
519
|
+
const vect = core_geometry_1.Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
|
|
520
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(vect) : vect;
|
|
521
|
+
const origin = this.state.origin.plus(offset);
|
|
522
|
+
const panningDirection = this._getPanVector();
|
|
523
|
+
const wasAlmostZero = this.state.panningDirection.isAlmostZero;
|
|
524
|
+
this.setState({ startOrigin: origin, origin, panningDirection, isPanning: false }, () => {
|
|
525
|
+
this._updateFrustum();
|
|
526
|
+
if (wasAlmostZero && !this.state.panningDirection.isAlmostZero) {
|
|
527
|
+
this._animationFrame = setTimeout(this._panAnimation, 16.667);
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
_processWindowEndDrag() {
|
|
532
|
+
this.setState({ isMoving: false });
|
|
533
|
+
this._updateFrustum(true);
|
|
534
|
+
if (this.state.mode === MapMode.Closed) {
|
|
535
|
+
setTimeout(() => {
|
|
536
|
+
const startMapOrigin = this.state.mapOrigin;
|
|
537
|
+
const mapOrigin = this.state.origin.clone();
|
|
538
|
+
// istanbul ignore next
|
|
539
|
+
if (this._mounted) {
|
|
540
|
+
this.setState({ startMapOrigin, mapOrigin, animation: 0 }, () => {
|
|
541
|
+
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
}, 0);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
DrawingNavigationAid._animationFn = (t) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
549
|
+
/** @internal */
|
|
550
|
+
DrawingNavigationAid.getDefaultClosedMapSize = () => {
|
|
551
|
+
return core_geometry_1.Vector3d.create(96, 96);
|
|
552
|
+
};
|
|
553
|
+
/** @internal */
|
|
554
|
+
DrawingNavigationAid.getDefaultOpenedMapSize = (paddingX = 0, paddingY = 0) => {
|
|
555
|
+
return core_geometry_1.Vector3d.create(window.innerWidth / 3 - 2 * (window.innerWidth - paddingX), window.innerHeight / 3 - 2 * paddingY);
|
|
556
|
+
};
|
|
557
|
+
/** @internal */
|
|
558
|
+
DrawingNavigationAid.findRotatedWindowDimensions = (extents, rotation) => {
|
|
559
|
+
const cos = rotation.at(0, 0);
|
|
560
|
+
const sin = rotation.at(1, 0);
|
|
561
|
+
// extents.x/y should be divided in half, but we don't have to do that immediately.
|
|
562
|
+
const cosWidth = cos * extents.x;
|
|
563
|
+
const sinHeight = sin * extents.y;
|
|
564
|
+
const sinWidth = cos * extents.x;
|
|
565
|
+
const cosHeight = sin * extents.y;
|
|
566
|
+
const a = Math.atan2(sin, cos);
|
|
567
|
+
if (a % Math.PI >= 0 && a % Math.PI < Math.PI / 2) {
|
|
568
|
+
const y1 = -cosHeight - sinWidth;
|
|
569
|
+
const x2 = cosWidth + sinHeight;
|
|
570
|
+
const y3 = cosHeight + sinWidth;
|
|
571
|
+
const x4 = -cosWidth - sinHeight;
|
|
572
|
+
// Instead, divide total difference
|
|
573
|
+
return core_geometry_1.Vector3d.create(Math.abs(x2 - x4) / 2, Math.abs(y1 - y3) / 2);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
const x1 = -cosWidth + sinHeight;
|
|
577
|
+
const y2 = -cosHeight + sinWidth;
|
|
578
|
+
const x3 = cosWidth - sinHeight;
|
|
579
|
+
const y4 = cosHeight - sinWidth;
|
|
580
|
+
return core_geometry_1.Vector3d.create(Math.abs(x1 - x3) / 2, Math.abs(y2 - y4) / 2);
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
exports.DrawingNavigationAid = DrawingNavigationAid;
|
|
584
|
+
/** @internal */
|
|
585
|
+
class DrawingNavigationCanvas extends React.Component {
|
|
586
|
+
constructor() {
|
|
587
|
+
super(...arguments);
|
|
588
|
+
this._canvasElement = React.createRef();
|
|
589
|
+
this._update = () => {
|
|
590
|
+
// istanbul ignore else
|
|
591
|
+
if (this._vp) {
|
|
592
|
+
const max = Math.max(this.props.extents.x, this.props.extents.y);
|
|
593
|
+
this._vp.view.extentLimits = { max, min: core_geometry_1.Constant.oneMillimeter };
|
|
594
|
+
this._vp.view.setOrigin(this.props.origin);
|
|
595
|
+
this._vp.view.setRotation(this.props.rotation);
|
|
596
|
+
this._vp.view.setExtents(this.props.extents);
|
|
597
|
+
this._vp.applyViewState(this._vp.view);
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
render() {
|
|
602
|
+
return (React.createElement("div", { className: "drawing-canvas", "data-testid": "drawing-canvas", ref: this._canvasElement }));
|
|
603
|
+
}
|
|
604
|
+
componentDidMount() {
|
|
605
|
+
if (this._canvasElement.current && this.props.view !== undefined) {
|
|
606
|
+
const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
607
|
+
/* istanbul ignore next */
|
|
608
|
+
const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
|
|
609
|
+
const previousView = viewManager.selectedView;
|
|
610
|
+
this._vp = screenViewport.create(this._canvasElement.current, this.props.view);
|
|
611
|
+
this.customizeViewport(this._vp);
|
|
612
|
+
viewManager.addViewport(this._vp);
|
|
613
|
+
void viewManager.setSelectedView(previousView); // switch to original viewport
|
|
614
|
+
this._update();
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
customizeViewport(vp) {
|
|
618
|
+
/* istanbul ignore next */
|
|
619
|
+
if (vp.logo.style)
|
|
620
|
+
vp.logo.style.display = "none";
|
|
621
|
+
/* istanbul ignore next */
|
|
622
|
+
if (vp.viewFlags.acsTriad)
|
|
623
|
+
vp.viewFlags = vp.viewFlags.with("acsTriad", false);
|
|
624
|
+
}
|
|
625
|
+
componentDidUpdate(oldProps) {
|
|
626
|
+
const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
627
|
+
if (this.props.view !== undefined) {
|
|
628
|
+
if (oldProps.view !== this.props.view) {
|
|
629
|
+
const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
|
|
630
|
+
if (oldProps !== undefined && oldProps.viewId !== "" && oldProps.viewId !== this.props.viewId && this._vp) {
|
|
631
|
+
viewManager.dropViewport(this._vp, true);
|
|
632
|
+
}
|
|
633
|
+
// istanbul ignore else
|
|
634
|
+
if (this._canvasElement.current &&
|
|
635
|
+
(this.props.canvasSizeOverride ||
|
|
636
|
+
( /* istanbul ignore next */this._canvasElement.current.clientWidth !== 0 && /* istanbul ignore next */ this._canvasElement.current.clientHeight !== 0))) {
|
|
637
|
+
const previousView = viewManager.selectedView;
|
|
638
|
+
this._vp = screenViewport.create(this._canvasElement.current, this.props.view.clone());
|
|
639
|
+
this.customizeViewport(this._vp);
|
|
640
|
+
viewManager.addViewport(this._vp);
|
|
641
|
+
void viewManager.setSelectedView(previousView); // switch to original viewport
|
|
642
|
+
this._update();
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
else if (!this.props.origin.isExactEqual(oldProps.origin) || !this.props.extents.isExactEqual(oldProps.extents) || this.props.zoom !== oldProps.zoom || !this.props.rotation.isExactEqual(oldProps.rotation)) {
|
|
646
|
+
this._update();
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
componentWillUnmount() {
|
|
651
|
+
if (this._vp) {
|
|
652
|
+
const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
653
|
+
viewManager.dropViewport(this._vp, true);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
exports.DrawingNavigationCanvas = DrawingNavigationCanvas;
|
|
648
658
|
//# sourceMappingURL=DrawingNavigationAid.js.map
|