@itwin/imodel-components-react 4.1.0 → 4.2.0
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 +335 -327
- package/LICENSE.md +9 -9
- package/README.md +11 -11
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +13 -10
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +23 -17
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +71 -63
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +11 -9
- 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 +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +6 -8
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +11 -12
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -62
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.js +32 -15
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.scss +78 -61
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +14 -11
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +36 -35
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.js +5 -8
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -22
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +3 -3
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js +17 -9
- 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.map +1 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js +8 -6
- 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 +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +18 -12
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +36 -22
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js +12 -16
- 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.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
- package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js +31 -11
- 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.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +103 -49
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +171 -66
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +20 -13
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +14 -10
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +33 -11
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +32 -24
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +15 -7
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +7 -4
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +27 -27
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +3 -3
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -28
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +32 -17
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -105
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +61 -27
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -359
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +4 -5
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
- package/lib/cjs/imodel-components-react/timeline/Timeline.scss +165 -165
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +56 -29
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -178
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.js +3 -3
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +45 -33
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/cjs/imodel-components-react.js +3 -3
- package/lib/cjs/imodel-components-react.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js +13 -10
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.js +23 -17
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.scss +71 -63
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +11 -9
- 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 +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +7 -9
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +13 -14
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -62
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.js +32 -15
- package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.scss +78 -61
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.js +14 -11
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.scss +36 -35
- package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.js +5 -8
- package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.scss +22 -22
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +3 -3
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.js +18 -10
- 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.map +1 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.js +10 -8
- 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 +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js +18 -12
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +38 -24
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.js +12 -16
- 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.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
- package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/Cube.js +31 -11
- 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.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +105 -51
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +173 -68
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +20 -13
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +14 -10
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +33 -11
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +32 -24
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +16 -8
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js +7 -4
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +27 -27
- package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js +3 -3
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -28
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +32 -17
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -105
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +63 -29
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -359
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +4 -5
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
- package/lib/esm/imodel-components-react/timeline/Timeline.scss +165 -165
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +58 -31
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -178
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.js +3 -3
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +47 -35
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.js +3 -3
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +139 -139
- package/package.json +15 -24
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module NavigationAids
|
|
7
7
|
*/
|
|
@@ -9,13 +9,13 @@ import "./DrawingNavigationAid.scss";
|
|
|
9
9
|
import classnames from "classnames";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import * as ReactDOM from "react-dom";
|
|
12
|
-
import { Constant, Geometry, Matrix3d, Point2d, Point3d, Point4d, Vector3d } from "@itwin/core-geometry";
|
|
12
|
+
import { Constant, Geometry, Matrix3d, Point2d, Point3d, Point4d, Vector3d, } from "@itwin/core-geometry";
|
|
13
13
|
import { IModelApp, ScreenViewport } from "@itwin/core-frontend";
|
|
14
14
|
import { SpecialKey } from "@itwin/appui-abstract";
|
|
15
15
|
import { Icon } from "@itwin/core-react";
|
|
16
16
|
import { UiIModelComponents } from "../UiIModelComponents";
|
|
17
17
|
import { ViewportComponentEvents } from "../viewport/ViewportComponentEvents";
|
|
18
|
-
import { SvgAdd, SvgRemove, SvgRotateLeft, SvgSortUp } from "@itwin/itwinui-icons-react";
|
|
18
|
+
import { SvgAdd, SvgRemove, SvgRotateLeft, SvgSortUp, } from "@itwin/itwinui-icons-react";
|
|
19
19
|
// cSpell:ignore Quaternion Quaternions unrotate
|
|
20
20
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
21
21
|
/**
|
|
@@ -37,7 +37,12 @@ class DrawingNavigationAid extends React.Component {
|
|
|
37
37
|
this._rootElement = React.createRef();
|
|
38
38
|
this._viewContainerElement = React.createRef();
|
|
39
39
|
this._viewElement = React.createRef();
|
|
40
|
-
this._rootOffset = DOMRect.fromRect({
|
|
40
|
+
this._rootOffset = DOMRect.fromRect({
|
|
41
|
+
x: 0,
|
|
42
|
+
y: 0,
|
|
43
|
+
width: 0,
|
|
44
|
+
height: 0,
|
|
45
|
+
});
|
|
41
46
|
this._mounted = false;
|
|
42
47
|
this._isViewport3D = () => {
|
|
43
48
|
return this.state.view !== undefined && this.state.view.is3d();
|
|
@@ -47,7 +52,8 @@ class DrawingNavigationAid extends React.Component {
|
|
|
47
52
|
const delta = this._lastTime ? t - this._lastTime : 16;
|
|
48
53
|
this._lastTime = t;
|
|
49
54
|
if (this.state.animation !== 1) {
|
|
50
|
-
const animation = Math.min(1, this.state.animation +
|
|
55
|
+
const animation = Math.min(1, this.state.animation +
|
|
56
|
+
delta / (1000 * (this.props.animationTime || 0.4)));
|
|
51
57
|
this._updateFrustum();
|
|
52
58
|
// istanbul ignore next
|
|
53
59
|
if (this._mounted) {
|
|
@@ -71,7 +77,13 @@ class DrawingNavigationAid extends React.Component {
|
|
|
71
77
|
const startRotation = this.state.rotation;
|
|
72
78
|
// istanbul ignore next
|
|
73
79
|
if (this._mounted) {
|
|
74
|
-
this.setState({
|
|
80
|
+
this.setState({
|
|
81
|
+
startMapOrigin,
|
|
82
|
+
startDrawingZoom,
|
|
83
|
+
startOrigin,
|
|
84
|
+
startRotation,
|
|
85
|
+
startMapExtents,
|
|
86
|
+
}, () => {
|
|
75
87
|
// istanbul ignore else
|
|
76
88
|
if (this.props.onAnimationEnd)
|
|
77
89
|
this.props.onAnimationEnd();
|
|
@@ -108,11 +120,15 @@ class DrawingNavigationAid extends React.Component {
|
|
|
108
120
|
// Synchronize with rotation coming from the Viewport
|
|
109
121
|
this._handleViewRotationChangeEvent = (args) => {
|
|
110
122
|
// istanbul ignore else
|
|
111
|
-
if (!this.state.isMoving &&
|
|
123
|
+
if (!this.state.isMoving &&
|
|
124
|
+
!this.state.isPanning &&
|
|
125
|
+
this.props.viewport === args.viewport) {
|
|
112
126
|
const extents = args.viewport.view.getExtents().clone();
|
|
113
127
|
const rotation = args.viewport.view.getRotation().clone();
|
|
114
|
-
const halfExtents = extents.scale(.5);
|
|
115
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
128
|
+
const halfExtents = extents.scale(0.5);
|
|
129
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
130
|
+
? rotation.multiplyTransposeVector(halfExtents)
|
|
131
|
+
: halfExtents;
|
|
116
132
|
const origin = args.viewport.view.getOrigin().plus(offset);
|
|
117
133
|
const deltaZoom = (this.state.extents.x - extents.x) / this.state.extents.x;
|
|
118
134
|
let drawingZoom = this.state.drawingZoom / (1 - deltaZoom);
|
|
@@ -120,28 +136,40 @@ class DrawingNavigationAid extends React.Component {
|
|
|
120
136
|
let mapOrigin = this.state.mapOrigin.plus(deltaOrigin);
|
|
121
137
|
mapOrigin = mapOrigin.plus(Vector3d.createFrom(origin.minus(mapOrigin)).scale(deltaZoom));
|
|
122
138
|
if (this.state.viewId !== args.viewport.view.id) {
|
|
123
|
-
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
139
|
+
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
140
|
+
? extents
|
|
141
|
+
: DrawingNavigationAid.findRotatedWindowDimensions(extents, rotation);
|
|
124
142
|
const maxRectDim = Math.max(rect.y, rect.x);
|
|
125
143
|
const maxExtentDim = Math.max(this.state.mapExtents.x, this.state.mapExtents.y);
|
|
126
144
|
drawingZoom = maxExtentDim / (3 * maxRectDim);
|
|
127
145
|
mapOrigin = origin.clone();
|
|
128
146
|
this._viewport = args.viewport;
|
|
129
|
-
this.setState({
|
|
147
|
+
this.setState({
|
|
148
|
+
viewId: args.viewport.view.id,
|
|
149
|
+
view: args.viewport.view.clone(),
|
|
150
|
+
});
|
|
130
151
|
}
|
|
131
152
|
// istanbul ignore next
|
|
132
153
|
if (this._mounted) {
|
|
133
154
|
this.setState({
|
|
134
|
-
startOrigin: origin,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
155
|
+
startOrigin: origin,
|
|
156
|
+
origin,
|
|
157
|
+
extents,
|
|
158
|
+
startRotation: rotation,
|
|
159
|
+
rotation,
|
|
160
|
+
startMapOrigin: mapOrigin,
|
|
161
|
+
mapOrigin,
|
|
162
|
+
startDrawingZoom: drawingZoom,
|
|
163
|
+
drawingZoom,
|
|
138
164
|
});
|
|
139
165
|
}
|
|
140
166
|
}
|
|
141
167
|
};
|
|
142
168
|
this._updateFrustum = (complete = false) => {
|
|
143
|
-
const halfExtents = this.state.extents.scale(.5);
|
|
144
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
169
|
+
const halfExtents = this.state.extents.scale(0.5);
|
|
170
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
171
|
+
? this.state.rotation.multiplyTransposeVector(halfExtents)
|
|
172
|
+
: halfExtents;
|
|
145
173
|
const origin = this.state.origin.minus(offset);
|
|
146
174
|
ViewportComponentEvents.setDrawingViewportState(origin, this.state.rotation, complete);
|
|
147
175
|
};
|
|
@@ -186,7 +214,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
186
214
|
// istanbul ignore else
|
|
187
215
|
if (this.state.isPanning && this.state.mode === MapMode.Opened) {
|
|
188
216
|
const vect = Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
|
|
189
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
217
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
218
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
219
|
+
: vect;
|
|
190
220
|
const mapOrigin = this.state.mapOrigin.minus(offset);
|
|
191
221
|
this.setState({ startMapOrigin: mapOrigin, mapOrigin });
|
|
192
222
|
}
|
|
@@ -197,7 +227,8 @@ class DrawingNavigationAid extends React.Component {
|
|
|
197
227
|
const mouse = Point2d.create(event.clientX, event.clientY);
|
|
198
228
|
if (mouse.isAlmostEqual(this.state.mouseStart) &&
|
|
199
229
|
this.state.mode === MapMode.Closed &&
|
|
200
|
-
(event.target === this._viewContainerElement.current ||
|
|
230
|
+
(event.target === this._viewContainerElement.current ||
|
|
231
|
+
event.target === this._viewElement.current)) {
|
|
201
232
|
this._openLargeMap();
|
|
202
233
|
}
|
|
203
234
|
else if (this.state.isMoving) {
|
|
@@ -210,7 +241,10 @@ class DrawingNavigationAid extends React.Component {
|
|
|
210
241
|
this.setState({ isPanning: false });
|
|
211
242
|
}
|
|
212
243
|
}
|
|
213
|
-
else if ((!(event.target instanceof Node) ||
|
|
244
|
+
else if ((!(event.target instanceof Node) ||
|
|
245
|
+
(this._rootElement.current &&
|
|
246
|
+
!this._rootElement.current.contains(event.target))) &&
|
|
247
|
+
mouse.isAlmostEqual(this.state.mouseStart)) {
|
|
214
248
|
this._closeLargeMap();
|
|
215
249
|
}
|
|
216
250
|
this._lastClientXY = Point2d.create(event.clientX, event.clientY);
|
|
@@ -268,8 +302,10 @@ class DrawingNavigationAid extends React.Component {
|
|
|
268
302
|
const mapExtents = this._getOpenedMapSize();
|
|
269
303
|
this.setState({
|
|
270
304
|
mode: MapMode.Opened,
|
|
271
|
-
isMoving: false,
|
|
272
|
-
|
|
305
|
+
isMoving: false,
|
|
306
|
+
isPanning: false,
|
|
307
|
+
mapExtents,
|
|
308
|
+
startMapExtents,
|
|
273
309
|
animation: 0,
|
|
274
310
|
}, () => {
|
|
275
311
|
this._animationFrame = setTimeout(this._animation);
|
|
@@ -283,17 +319,23 @@ class DrawingNavigationAid extends React.Component {
|
|
|
283
319
|
const mapOrigin = this.state.origin.clone();
|
|
284
320
|
const startMapExtents = Vector3d.createFrom(this.state.mapExtents);
|
|
285
321
|
const mapExtents = this._getClosedMapSize();
|
|
286
|
-
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
322
|
+
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
323
|
+
? this.state.extents
|
|
324
|
+
: DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
|
|
287
325
|
const maxRectDim = Math.max(rect.y, rect.x);
|
|
288
326
|
const maxExtentDim = Math.max(mapExtents.x, mapExtents.y);
|
|
289
327
|
const drawingZoom = maxExtentDim / (3 * maxRectDim);
|
|
290
328
|
const startDrawingZoom = this.state.drawingZoom;
|
|
291
329
|
this.setState({
|
|
292
330
|
mode: MapMode.Closed,
|
|
293
|
-
startMapOrigin,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
331
|
+
startMapOrigin,
|
|
332
|
+
mapOrigin,
|
|
333
|
+
startDrawingZoom,
|
|
334
|
+
drawingZoom,
|
|
335
|
+
isMoving: false,
|
|
336
|
+
isPanning: false,
|
|
337
|
+
startMapExtents,
|
|
338
|
+
mapExtents,
|
|
297
339
|
panningDirection: Vector3d.createZero(),
|
|
298
340
|
animation: 0,
|
|
299
341
|
}, () => {
|
|
@@ -303,17 +345,23 @@ class DrawingNavigationAid extends React.Component {
|
|
|
303
345
|
};
|
|
304
346
|
this._getPanVector = () => {
|
|
305
347
|
const is3D = this._isViewport3D();
|
|
306
|
-
const rect = this.state.rotateMinimapWithView || is3D
|
|
348
|
+
const rect = this.state.rotateMinimapWithView || is3D
|
|
349
|
+
? this.state.extents
|
|
350
|
+
: DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
|
|
307
351
|
const mapExtents = this.state.mapExtents.scale(1 / this.state.drawingZoom);
|
|
308
352
|
const maxMagnitude = 80; // maximum acceleration
|
|
309
353
|
const magnitudeTravel = 30; // How far, in pixels, that magnitude increases from 0 to max acceleration
|
|
310
354
|
const diff = Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin));
|
|
311
|
-
const diffVector = this.state.rotateMinimapWithView || is3D
|
|
355
|
+
const diffVector = this.state.rotateMinimapWithView || is3D
|
|
356
|
+
? this.state.rotation.multiplyVector(diff)
|
|
357
|
+
: diff;
|
|
312
358
|
// capture any values
|
|
313
359
|
const magnitudeVector = 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));
|
|
314
360
|
if (magnitudeVector.isAlmostZero)
|
|
315
361
|
return Vector3d.createZero();
|
|
316
|
-
const magnitude = Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) /
|
|
362
|
+
const magnitude = (Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) /
|
|
363
|
+
magnitudeTravel) *
|
|
364
|
+
maxMagnitude;
|
|
317
365
|
const vect = Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin)); // vect will never be zero or magnitude would also be zero
|
|
318
366
|
const norm = vect.normalize();
|
|
319
367
|
return norm.scale(magnitude); // norm is only undefined when vect is zero, in which it would have returned at magnitudeVector.isAlmostZero
|
|
@@ -328,15 +376,19 @@ class DrawingNavigationAid extends React.Component {
|
|
|
328
376
|
const is3D = this._isViewport3D();
|
|
329
377
|
if (event.deltaY < 0) {
|
|
330
378
|
const zoom = drawingZoom * 1.1;
|
|
331
|
-
const vect = Vector3d.create(mouseX * 0.1 / zoom, -mouseY * 0.1 / zoom, 0);
|
|
332
|
-
const offset = this.state.rotateMinimapWithView || is3D
|
|
379
|
+
const vect = Vector3d.create((mouseX * 0.1) / zoom, (-mouseY * 0.1) / zoom, 0);
|
|
380
|
+
const offset = this.state.rotateMinimapWithView || is3D
|
|
381
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
382
|
+
: vect;
|
|
333
383
|
const m = mapOrigin.plus(offset);
|
|
334
384
|
this.setState({ mapOrigin: m, drawingZoom: zoom });
|
|
335
385
|
}
|
|
336
386
|
if (event.deltaY > 0) {
|
|
337
387
|
const zoom = drawingZoom / 1.1;
|
|
338
|
-
const vect = Vector3d.create(mouseX * 0.1 / drawingZoom, -mouseY * 0.1 / drawingZoom, 0);
|
|
339
|
-
const offset = this.state.rotateMinimapWithView || is3D
|
|
388
|
+
const vect = Vector3d.create((mouseX * 0.1) / drawingZoom, (-mouseY * 0.1) / drawingZoom, 0);
|
|
389
|
+
const offset = this.state.rotateMinimapWithView || is3D
|
|
390
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
391
|
+
: vect;
|
|
340
392
|
const m = mapOrigin.minus(offset);
|
|
341
393
|
this.setState({ mapOrigin: m, drawingZoom: zoom });
|
|
342
394
|
}
|
|
@@ -352,18 +404,32 @@ class DrawingNavigationAid extends React.Component {
|
|
|
352
404
|
};
|
|
353
405
|
this._handleUnrotate = () => {
|
|
354
406
|
const startRotation = this.state.rotation;
|
|
355
|
-
const halfExtents = this.state.extents.scale(.5);
|
|
356
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
407
|
+
const halfExtents = this.state.extents.scale(0.5);
|
|
408
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
409
|
+
? Vector3d.createZero()
|
|
410
|
+
: this.state.rotation
|
|
411
|
+
.multiplyTransposeVector(halfExtents)
|
|
412
|
+
.minus(halfExtents);
|
|
357
413
|
const startOrigin = this.state.origin;
|
|
358
414
|
const origin = this.state.origin.plus(offset);
|
|
359
415
|
const startMapOrigin = this.state.mapOrigin;
|
|
360
416
|
const mapOrigin = this.state.mapOrigin.plus(offset);
|
|
361
|
-
this.setState({
|
|
417
|
+
this.setState({
|
|
418
|
+
animation: 0,
|
|
419
|
+
startOrigin,
|
|
420
|
+
origin,
|
|
421
|
+
startMapOrigin,
|
|
422
|
+
mapOrigin,
|
|
423
|
+
startRotation,
|
|
424
|
+
rotation: Matrix3d.createIdentity(),
|
|
425
|
+
}, () => {
|
|
362
426
|
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
363
427
|
});
|
|
364
428
|
};
|
|
365
429
|
const mode = props.initialMapMode || MapMode.Closed;
|
|
366
|
-
const mapExtents = mode === MapMode.Closed
|
|
430
|
+
const mapExtents = mode === MapMode.Closed
|
|
431
|
+
? this._getClosedMapSize()
|
|
432
|
+
: this._getOpenedMapSize();
|
|
367
433
|
const startMapExtents = mapExtents;
|
|
368
434
|
this.state = {
|
|
369
435
|
startOrigin: Point3d.createZero(),
|
|
@@ -385,7 +451,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
385
451
|
view: props.initialView,
|
|
386
452
|
isMoving: false,
|
|
387
453
|
isPanning: false,
|
|
388
|
-
rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined
|
|
454
|
+
rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined
|
|
455
|
+
? props.initialRotateMinimapWithView
|
|
456
|
+
: false,
|
|
389
457
|
};
|
|
390
458
|
}
|
|
391
459
|
/** @internal */
|
|
@@ -398,12 +466,17 @@ class DrawingNavigationAid extends React.Component {
|
|
|
398
466
|
const sz = startMapExtents.interpolate(a, mapExtents);
|
|
399
467
|
const dz = Geometry.interpolate(startDrawingZoom, a, drawingZoom);
|
|
400
468
|
const rootStyle = {
|
|
401
|
-
width: sz.x,
|
|
469
|
+
width: sz.x,
|
|
470
|
+
height: sz.y,
|
|
402
471
|
...this.props.style,
|
|
403
472
|
};
|
|
404
473
|
const is3D = this._isViewport3D();
|
|
405
|
-
const tOr = rotateMinimapWithView || is3D
|
|
406
|
-
|
|
474
|
+
const tOr = rotateMinimapWithView || is3D
|
|
475
|
+
? rotation.multiplyVector(Vector3d.createFrom(or))
|
|
476
|
+
: Vector3d.createFrom(or);
|
|
477
|
+
const tMap = rotateMinimapWithView || is3D
|
|
478
|
+
? rotation.multiplyVector(Vector3d.createFrom(map))
|
|
479
|
+
: Vector3d.createFrom(map);
|
|
407
480
|
const tPosX = (tOr.x - extents.x / 2 - tMap.x) * dz + sz.x / 2;
|
|
408
481
|
const tPosY = (-tOr.y - extents.y / 2 + tMap.y) * dz + sz.y / 2;
|
|
409
482
|
const viewWindowStyle = {
|
|
@@ -424,24 +497,34 @@ class DrawingNavigationAid extends React.Component {
|
|
|
424
497
|
rootStyle.right = window.innerWidth - this._rootOffset.right;
|
|
425
498
|
rootStyle.top = this._rootOffset.top;
|
|
426
499
|
}
|
|
427
|
-
const halfExtents = extents.scale(.5);
|
|
428
|
-
const offset = rotateMinimapWithView || is3D
|
|
500
|
+
const halfExtents = extents.scale(0.5);
|
|
501
|
+
const offset = rotateMinimapWithView || is3D
|
|
502
|
+
? Vector3d.createZero()
|
|
503
|
+
: rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
|
|
429
504
|
const unrotateLabel = UiIModelComponents.translate("drawing.unrotate");
|
|
430
505
|
const e = sz.scale(1 / dz);
|
|
431
|
-
const halfMapExtents = e.scale(.5);
|
|
432
|
-
const mapOffset = rotateMinimapWithView || is3D
|
|
433
|
-
|
|
434
|
-
|
|
506
|
+
const halfMapExtents = e.scale(0.5);
|
|
507
|
+
const mapOffset = rotateMinimapWithView || is3D
|
|
508
|
+
? rotation.multiplyTransposeVector(halfMapExtents)
|
|
509
|
+
: halfMapExtents;
|
|
510
|
+
const viewManager = this.props.viewManagerOverride
|
|
511
|
+
? this.props.viewManagerOverride
|
|
512
|
+
: /* istanbul ignore next */ IModelApp.viewManager;
|
|
513
|
+
const screenViewport = this.props.screenViewportOverride
|
|
514
|
+
? this.props.screenViewportOverride
|
|
515
|
+
: /* istanbul ignore next */ ScreenViewport;
|
|
435
516
|
const nodes = (React.createElement("div", { className: classnames("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" },
|
|
436
517
|
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 : Matrix3d.createIdentity() }),
|
|
437
518
|
React.createElement("div", { className: "drawing-container", "data-testid": "drawing-container", ref: this._viewContainerElement },
|
|
438
519
|
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" }),
|
|
439
|
-
!is3D &&
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
520
|
+
!is3D && (React.createElement("div", { className: classnames("toggle-rotate-style", "icon", {
|
|
521
|
+
checked: rotateMinimapWithView,
|
|
522
|
+
}), "data-testid": "toggle-rotate-style", style: mode === MapMode.Closed && !isAnimating
|
|
523
|
+
? { bottom: 2, left: 2 }
|
|
524
|
+
: {}, title: UiIModelComponents.translate("drawing.rotateStyle"), onClick: this._toggleRotationMode, role: "presentation" },
|
|
525
|
+
React.createElement(Icon, { iconSpec: React.createElement(SvgRotateLeft, null) }))),
|
|
526
|
+
!rot.isIdentity && (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)),
|
|
527
|
+
mode === MapMode.Opened && !isAnimating && (React.createElement(React.Fragment, null,
|
|
445
528
|
React.createElement("div", { className: "close", "data-testid": "drawing-close-button", onClick: this._closeLargeMap, role: "button", tabIndex: -1 },
|
|
446
529
|
React.createElement("div", { className: "close-icon icon" },
|
|
447
530
|
React.createElement(Icon, { iconSpec: React.createElement(SvgSortUp, null) }))),
|
|
@@ -449,8 +532,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
449
532
|
React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-in-button", onClick: this._handleZoomIn, role: "button", tabIndex: -1 },
|
|
450
533
|
React.createElement(Icon, { iconSpec: React.createElement(SvgAdd, null) })),
|
|
451
534
|
React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-out-button", onClick: this._handleZoomOut, role: "button", tabIndex: -1 },
|
|
452
|
-
React.createElement(Icon, { iconSpec: React.createElement(SvgRemove, null) })))))));
|
|
453
|
-
if (mode === MapMode.Closed &&
|
|
535
|
+
React.createElement(Icon, { iconSpec: React.createElement(SvgRemove, null) }))))))));
|
|
536
|
+
if (mode === MapMode.Closed &&
|
|
537
|
+
(animation === 1.0 || startMapExtents.isExactEqual(mapExtents))) {
|
|
454
538
|
return nodes;
|
|
455
539
|
}
|
|
456
540
|
else {
|
|
@@ -488,7 +572,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
488
572
|
}
|
|
489
573
|
_processWindowDrag(movement) {
|
|
490
574
|
const vect = Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
|
|
491
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
575
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
576
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
577
|
+
: vect;
|
|
492
578
|
const origin = this.state.origin.plus(offset);
|
|
493
579
|
const panningDirection = this._getPanVector();
|
|
494
580
|
const wasAlmostZero = this.state.panningDirection.isAlmostZero;
|
|
@@ -516,7 +602,7 @@ class DrawingNavigationAid extends React.Component {
|
|
|
516
602
|
}
|
|
517
603
|
}
|
|
518
604
|
}
|
|
519
|
-
DrawingNavigationAid._animationFn = (t) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
605
|
+
DrawingNavigationAid._animationFn = (t) => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
520
606
|
/** @internal */
|
|
521
607
|
DrawingNavigationAid.getDefaultClosedMapSize = () => {
|
|
522
608
|
return Vector3d.create(96, 96);
|
|
@@ -574,9 +660,13 @@ export class DrawingNavigationCanvas extends React.Component {
|
|
|
574
660
|
}
|
|
575
661
|
componentDidMount() {
|
|
576
662
|
if (this._canvasElement.current && this.props.view !== undefined) {
|
|
577
|
-
const viewManager = this.props.viewManagerOverride
|
|
663
|
+
const viewManager = this.props.viewManagerOverride
|
|
664
|
+
? this.props.viewManagerOverride
|
|
665
|
+
: /* istanbul ignore next */ IModelApp.viewManager;
|
|
578
666
|
/* istanbul ignore next */
|
|
579
|
-
const screenViewport = this.props.screenViewportOverride
|
|
667
|
+
const screenViewport = this.props.screenViewportOverride
|
|
668
|
+
? this.props.screenViewportOverride
|
|
669
|
+
: /* istanbul ignore next */ ScreenViewport;
|
|
580
670
|
const previousView = viewManager.selectedView;
|
|
581
671
|
this._vp = screenViewport.create(this._canvasElement.current, this.props.view);
|
|
582
672
|
this.customizeViewport(this._vp);
|
|
@@ -594,17 +684,27 @@ export class DrawingNavigationCanvas extends React.Component {
|
|
|
594
684
|
vp.viewFlags = vp.viewFlags.with("acsTriad", false);
|
|
595
685
|
}
|
|
596
686
|
componentDidUpdate(oldProps) {
|
|
597
|
-
const viewManager = this.props.viewManagerOverride
|
|
687
|
+
const viewManager = this.props.viewManagerOverride
|
|
688
|
+
? this.props.viewManagerOverride
|
|
689
|
+
: /* istanbul ignore next */ IModelApp.viewManager;
|
|
598
690
|
if (this.props.view !== undefined) {
|
|
599
691
|
if (oldProps.view !== this.props.view) {
|
|
600
|
-
const screenViewport = this.props.screenViewportOverride
|
|
601
|
-
|
|
692
|
+
const screenViewport = this.props.screenViewportOverride
|
|
693
|
+
? this.props.screenViewportOverride
|
|
694
|
+
: /* istanbul ignore next */ ScreenViewport;
|
|
695
|
+
if (oldProps !== undefined &&
|
|
696
|
+
oldProps.viewId !== "" &&
|
|
697
|
+
oldProps.viewId !== this.props.viewId &&
|
|
698
|
+
this._vp) {
|
|
602
699
|
viewManager.dropViewport(this._vp, true);
|
|
603
700
|
}
|
|
604
701
|
// istanbul ignore else
|
|
605
702
|
if (this._canvasElement.current &&
|
|
606
703
|
(this.props.canvasSizeOverride ||
|
|
607
|
-
|
|
704
|
+
/* istanbul ignore next */ (this._canvasElement.current
|
|
705
|
+
.clientWidth !== 0 &&
|
|
706
|
+
/* istanbul ignore next */ this._canvasElement.current
|
|
707
|
+
.clientHeight !== 0))) {
|
|
608
708
|
const previousView = viewManager.selectedView;
|
|
609
709
|
this._vp = screenViewport.create(this._canvasElement.current, this.props.view.clone());
|
|
610
710
|
this.customizeViewport(this._vp);
|
|
@@ -613,14 +713,19 @@ export class DrawingNavigationCanvas extends React.Component {
|
|
|
613
713
|
this._update();
|
|
614
714
|
}
|
|
615
715
|
}
|
|
616
|
-
else if (!this.props.origin.isExactEqual(oldProps.origin) ||
|
|
716
|
+
else if (!this.props.origin.isExactEqual(oldProps.origin) ||
|
|
717
|
+
!this.props.extents.isExactEqual(oldProps.extents) ||
|
|
718
|
+
this.props.zoom !== oldProps.zoom ||
|
|
719
|
+
!this.props.rotation.isExactEqual(oldProps.rotation)) {
|
|
617
720
|
this._update();
|
|
618
721
|
}
|
|
619
722
|
}
|
|
620
723
|
}
|
|
621
724
|
componentWillUnmount() {
|
|
622
725
|
if (this._vp) {
|
|
623
|
-
const viewManager = this.props.viewManagerOverride
|
|
726
|
+
const viewManager = this.props.viewManagerOverride
|
|
727
|
+
? this.props.viewManagerOverride
|
|
728
|
+
: /* istanbul ignore next */ IModelApp.viewManager;
|
|
624
729
|
viewManager.dropViewport(this._vp, true);
|
|
625
730
|
}
|
|
626
731
|
}
|