@itwin/imodel-components-react 4.1.0-dev.1 → 4.2.0-dev.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 +327 -319
- 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 +11 -6
- 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 +15 -7
- 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 +10 -8
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- 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/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 +27 -10
- 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 +5 -4
- 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/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/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/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 +35 -21
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- 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/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/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/CubeNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +98 -39
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- 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/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +19 -12
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +4 -6
- 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 +12 -8
- 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 +31 -10
- 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 +15 -8
- 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 +34 -22
- 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 +61 -38
- 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 +21 -10
- 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 +4 -4
- 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/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/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/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 +4 -4
- package/lib/cjs/imodel-components-react/timeline/Timeline.scss +124 -124
- 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 +4 -4
- 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 +40 -26
- 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 +11 -6
- 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 +15 -7
- 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 +10 -8
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- 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/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 +27 -10
- 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 +5 -4
- 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/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/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/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 +37 -23
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- 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/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/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/CubeNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +100 -41
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- 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/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +19 -12
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +4 -6
- 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 +12 -8
- 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 +31 -10
- 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 +15 -8
- 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 +34 -22
- 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 +61 -38
- 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 +21 -10
- 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 +4 -4
- 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/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/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/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 +4 -4
- package/lib/esm/imodel-components-react/timeline/Timeline.scss +124 -124
- 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 +4 -4
- 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 +42 -28
- 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/package.json +15 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
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
6
|
/** @packageDocumentation
|
|
7
7
|
* @module NavigationAids
|
|
8
8
|
*/
|
|
@@ -66,7 +66,12 @@ class DrawingNavigationAid extends React.Component {
|
|
|
66
66
|
this._rootElement = React.createRef();
|
|
67
67
|
this._viewContainerElement = React.createRef();
|
|
68
68
|
this._viewElement = React.createRef();
|
|
69
|
-
this._rootOffset = DOMRect.fromRect({
|
|
69
|
+
this._rootOffset = DOMRect.fromRect({
|
|
70
|
+
x: 0,
|
|
71
|
+
y: 0,
|
|
72
|
+
width: 0,
|
|
73
|
+
height: 0,
|
|
74
|
+
});
|
|
70
75
|
this._mounted = false;
|
|
71
76
|
this._isViewport3D = () => {
|
|
72
77
|
return this.state.view !== undefined && this.state.view.is3d();
|
|
@@ -76,7 +81,8 @@ class DrawingNavigationAid extends React.Component {
|
|
|
76
81
|
const delta = this._lastTime ? t - this._lastTime : 16;
|
|
77
82
|
this._lastTime = t;
|
|
78
83
|
if (this.state.animation !== 1) {
|
|
79
|
-
const animation = Math.min(1, this.state.animation +
|
|
84
|
+
const animation = Math.min(1, this.state.animation +
|
|
85
|
+
delta / (1000 * (this.props.animationTime || 0.4)));
|
|
80
86
|
this._updateFrustum();
|
|
81
87
|
// istanbul ignore next
|
|
82
88
|
if (this._mounted) {
|
|
@@ -100,7 +106,13 @@ class DrawingNavigationAid extends React.Component {
|
|
|
100
106
|
const startRotation = this.state.rotation;
|
|
101
107
|
// istanbul ignore next
|
|
102
108
|
if (this._mounted) {
|
|
103
|
-
this.setState({
|
|
109
|
+
this.setState({
|
|
110
|
+
startMapOrigin,
|
|
111
|
+
startDrawingZoom,
|
|
112
|
+
startOrigin,
|
|
113
|
+
startRotation,
|
|
114
|
+
startMapExtents,
|
|
115
|
+
}, () => {
|
|
104
116
|
// istanbul ignore else
|
|
105
117
|
if (this.props.onAnimationEnd)
|
|
106
118
|
this.props.onAnimationEnd();
|
|
@@ -137,11 +149,15 @@ class DrawingNavigationAid extends React.Component {
|
|
|
137
149
|
// Synchronize with rotation coming from the Viewport
|
|
138
150
|
this._handleViewRotationChangeEvent = (args) => {
|
|
139
151
|
// istanbul ignore else
|
|
140
|
-
if (!this.state.isMoving &&
|
|
152
|
+
if (!this.state.isMoving &&
|
|
153
|
+
!this.state.isPanning &&
|
|
154
|
+
this.props.viewport === args.viewport) {
|
|
141
155
|
const extents = args.viewport.view.getExtents().clone();
|
|
142
156
|
const rotation = args.viewport.view.getRotation().clone();
|
|
143
|
-
const halfExtents = extents.scale(.5);
|
|
144
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
157
|
+
const halfExtents = extents.scale(0.5);
|
|
158
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
159
|
+
? rotation.multiplyTransposeVector(halfExtents)
|
|
160
|
+
: halfExtents;
|
|
145
161
|
const origin = args.viewport.view.getOrigin().plus(offset);
|
|
146
162
|
const deltaZoom = (this.state.extents.x - extents.x) / this.state.extents.x;
|
|
147
163
|
let drawingZoom = this.state.drawingZoom / (1 - deltaZoom);
|
|
@@ -149,28 +165,40 @@ class DrawingNavigationAid extends React.Component {
|
|
|
149
165
|
let mapOrigin = this.state.mapOrigin.plus(deltaOrigin);
|
|
150
166
|
mapOrigin = mapOrigin.plus(core_geometry_1.Vector3d.createFrom(origin.minus(mapOrigin)).scale(deltaZoom));
|
|
151
167
|
if (this.state.viewId !== args.viewport.view.id) {
|
|
152
|
-
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
168
|
+
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
169
|
+
? extents
|
|
170
|
+
: DrawingNavigationAid.findRotatedWindowDimensions(extents, rotation);
|
|
153
171
|
const maxRectDim = Math.max(rect.y, rect.x);
|
|
154
172
|
const maxExtentDim = Math.max(this.state.mapExtents.x, this.state.mapExtents.y);
|
|
155
173
|
drawingZoom = maxExtentDim / (3 * maxRectDim);
|
|
156
174
|
mapOrigin = origin.clone();
|
|
157
175
|
this._viewport = args.viewport;
|
|
158
|
-
this.setState({
|
|
176
|
+
this.setState({
|
|
177
|
+
viewId: args.viewport.view.id,
|
|
178
|
+
view: args.viewport.view.clone(),
|
|
179
|
+
});
|
|
159
180
|
}
|
|
160
181
|
// istanbul ignore next
|
|
161
182
|
if (this._mounted) {
|
|
162
183
|
this.setState({
|
|
163
|
-
startOrigin: origin,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
184
|
+
startOrigin: origin,
|
|
185
|
+
origin,
|
|
186
|
+
extents,
|
|
187
|
+
startRotation: rotation,
|
|
188
|
+
rotation,
|
|
189
|
+
startMapOrigin: mapOrigin,
|
|
190
|
+
mapOrigin,
|
|
191
|
+
startDrawingZoom: drawingZoom,
|
|
192
|
+
drawingZoom,
|
|
167
193
|
});
|
|
168
194
|
}
|
|
169
195
|
}
|
|
170
196
|
};
|
|
171
197
|
this._updateFrustum = (complete = false) => {
|
|
172
|
-
const halfExtents = this.state.extents.scale(.5);
|
|
173
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
198
|
+
const halfExtents = this.state.extents.scale(0.5);
|
|
199
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
200
|
+
? this.state.rotation.multiplyTransposeVector(halfExtents)
|
|
201
|
+
: halfExtents;
|
|
174
202
|
const origin = this.state.origin.minus(offset);
|
|
175
203
|
ViewportComponentEvents_1.ViewportComponentEvents.setDrawingViewportState(origin, this.state.rotation, complete);
|
|
176
204
|
};
|
|
@@ -215,7 +243,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
215
243
|
// istanbul ignore else
|
|
216
244
|
if (this.state.isPanning && this.state.mode === MapMode.Opened) {
|
|
217
245
|
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()
|
|
246
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
247
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
248
|
+
: vect;
|
|
219
249
|
const mapOrigin = this.state.mapOrigin.minus(offset);
|
|
220
250
|
this.setState({ startMapOrigin: mapOrigin, mapOrigin });
|
|
221
251
|
}
|
|
@@ -226,7 +256,8 @@ class DrawingNavigationAid extends React.Component {
|
|
|
226
256
|
const mouse = core_geometry_1.Point2d.create(event.clientX, event.clientY);
|
|
227
257
|
if (mouse.isAlmostEqual(this.state.mouseStart) &&
|
|
228
258
|
this.state.mode === MapMode.Closed &&
|
|
229
|
-
(event.target === this._viewContainerElement.current ||
|
|
259
|
+
(event.target === this._viewContainerElement.current ||
|
|
260
|
+
event.target === this._viewElement.current)) {
|
|
230
261
|
this._openLargeMap();
|
|
231
262
|
}
|
|
232
263
|
else if (this.state.isMoving) {
|
|
@@ -239,7 +270,10 @@ class DrawingNavigationAid extends React.Component {
|
|
|
239
270
|
this.setState({ isPanning: false });
|
|
240
271
|
}
|
|
241
272
|
}
|
|
242
|
-
else if ((!(event.target instanceof Node) ||
|
|
273
|
+
else if ((!(event.target instanceof Node) ||
|
|
274
|
+
(this._rootElement.current &&
|
|
275
|
+
!this._rootElement.current.contains(event.target))) &&
|
|
276
|
+
mouse.isAlmostEqual(this.state.mouseStart)) {
|
|
243
277
|
this._closeLargeMap();
|
|
244
278
|
}
|
|
245
279
|
this._lastClientXY = core_geometry_1.Point2d.create(event.clientX, event.clientY);
|
|
@@ -297,8 +331,10 @@ class DrawingNavigationAid extends React.Component {
|
|
|
297
331
|
const mapExtents = this._getOpenedMapSize();
|
|
298
332
|
this.setState({
|
|
299
333
|
mode: MapMode.Opened,
|
|
300
|
-
isMoving: false,
|
|
301
|
-
|
|
334
|
+
isMoving: false,
|
|
335
|
+
isPanning: false,
|
|
336
|
+
mapExtents,
|
|
337
|
+
startMapExtents,
|
|
302
338
|
animation: 0,
|
|
303
339
|
}, () => {
|
|
304
340
|
this._animationFrame = setTimeout(this._animation);
|
|
@@ -312,17 +348,23 @@ class DrawingNavigationAid extends React.Component {
|
|
|
312
348
|
const mapOrigin = this.state.origin.clone();
|
|
313
349
|
const startMapExtents = core_geometry_1.Vector3d.createFrom(this.state.mapExtents);
|
|
314
350
|
const mapExtents = this._getClosedMapSize();
|
|
315
|
-
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
351
|
+
const rect = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
352
|
+
? this.state.extents
|
|
353
|
+
: DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
|
|
316
354
|
const maxRectDim = Math.max(rect.y, rect.x);
|
|
317
355
|
const maxExtentDim = Math.max(mapExtents.x, mapExtents.y);
|
|
318
356
|
const drawingZoom = maxExtentDim / (3 * maxRectDim);
|
|
319
357
|
const startDrawingZoom = this.state.drawingZoom;
|
|
320
358
|
this.setState({
|
|
321
359
|
mode: MapMode.Closed,
|
|
322
|
-
startMapOrigin,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
360
|
+
startMapOrigin,
|
|
361
|
+
mapOrigin,
|
|
362
|
+
startDrawingZoom,
|
|
363
|
+
drawingZoom,
|
|
364
|
+
isMoving: false,
|
|
365
|
+
isPanning: false,
|
|
366
|
+
startMapExtents,
|
|
367
|
+
mapExtents,
|
|
326
368
|
panningDirection: core_geometry_1.Vector3d.createZero(),
|
|
327
369
|
animation: 0,
|
|
328
370
|
}, () => {
|
|
@@ -332,17 +374,23 @@ class DrawingNavigationAid extends React.Component {
|
|
|
332
374
|
};
|
|
333
375
|
this._getPanVector = () => {
|
|
334
376
|
const is3D = this._isViewport3D();
|
|
335
|
-
const rect = this.state.rotateMinimapWithView || is3D
|
|
377
|
+
const rect = this.state.rotateMinimapWithView || is3D
|
|
378
|
+
? this.state.extents
|
|
379
|
+
: DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
|
|
336
380
|
const mapExtents = this.state.mapExtents.scale(1 / this.state.drawingZoom);
|
|
337
381
|
const maxMagnitude = 80; // maximum acceleration
|
|
338
382
|
const magnitudeTravel = 30; // How far, in pixels, that magnitude increases from 0 to max acceleration
|
|
339
383
|
const diff = core_geometry_1.Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin));
|
|
340
|
-
const diffVector = this.state.rotateMinimapWithView || is3D
|
|
384
|
+
const diffVector = this.state.rotateMinimapWithView || is3D
|
|
385
|
+
? this.state.rotation.multiplyVector(diff)
|
|
386
|
+
: diff;
|
|
341
387
|
// capture any values
|
|
342
388
|
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
389
|
if (magnitudeVector.isAlmostZero)
|
|
344
390
|
return core_geometry_1.Vector3d.createZero();
|
|
345
|
-
const magnitude = Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) /
|
|
391
|
+
const magnitude = (Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) /
|
|
392
|
+
magnitudeTravel) *
|
|
393
|
+
maxMagnitude;
|
|
346
394
|
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
395
|
const norm = vect.normalize();
|
|
348
396
|
return norm.scale(magnitude); // norm is only undefined when vect is zero, in which it would have returned at magnitudeVector.isAlmostZero
|
|
@@ -357,15 +405,19 @@ class DrawingNavigationAid extends React.Component {
|
|
|
357
405
|
const is3D = this._isViewport3D();
|
|
358
406
|
if (event.deltaY < 0) {
|
|
359
407
|
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
|
|
408
|
+
const vect = core_geometry_1.Vector3d.create((mouseX * 0.1) / zoom, (-mouseY * 0.1) / zoom, 0);
|
|
409
|
+
const offset = this.state.rotateMinimapWithView || is3D
|
|
410
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
411
|
+
: vect;
|
|
362
412
|
const m = mapOrigin.plus(offset);
|
|
363
413
|
this.setState({ mapOrigin: m, drawingZoom: zoom });
|
|
364
414
|
}
|
|
365
415
|
if (event.deltaY > 0) {
|
|
366
416
|
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
|
|
417
|
+
const vect = core_geometry_1.Vector3d.create((mouseX * 0.1) / drawingZoom, (-mouseY * 0.1) / drawingZoom, 0);
|
|
418
|
+
const offset = this.state.rotateMinimapWithView || is3D
|
|
419
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
420
|
+
: vect;
|
|
369
421
|
const m = mapOrigin.minus(offset);
|
|
370
422
|
this.setState({ mapOrigin: m, drawingZoom: zoom });
|
|
371
423
|
}
|
|
@@ -381,18 +433,32 @@ class DrawingNavigationAid extends React.Component {
|
|
|
381
433
|
};
|
|
382
434
|
this._handleUnrotate = () => {
|
|
383
435
|
const startRotation = this.state.rotation;
|
|
384
|
-
const halfExtents = this.state.extents.scale(.5);
|
|
385
|
-
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
436
|
+
const halfExtents = this.state.extents.scale(0.5);
|
|
437
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
438
|
+
? core_geometry_1.Vector3d.createZero()
|
|
439
|
+
: this.state.rotation
|
|
440
|
+
.multiplyTransposeVector(halfExtents)
|
|
441
|
+
.minus(halfExtents);
|
|
386
442
|
const startOrigin = this.state.origin;
|
|
387
443
|
const origin = this.state.origin.plus(offset);
|
|
388
444
|
const startMapOrigin = this.state.mapOrigin;
|
|
389
445
|
const mapOrigin = this.state.mapOrigin.plus(offset);
|
|
390
|
-
this.setState({
|
|
446
|
+
this.setState({
|
|
447
|
+
animation: 0,
|
|
448
|
+
startOrigin,
|
|
449
|
+
origin,
|
|
450
|
+
startMapOrigin,
|
|
451
|
+
mapOrigin,
|
|
452
|
+
startRotation,
|
|
453
|
+
rotation: core_geometry_1.Matrix3d.createIdentity(),
|
|
454
|
+
}, () => {
|
|
391
455
|
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
392
456
|
});
|
|
393
457
|
};
|
|
394
458
|
const mode = props.initialMapMode || MapMode.Closed;
|
|
395
|
-
const mapExtents = mode === MapMode.Closed
|
|
459
|
+
const mapExtents = mode === MapMode.Closed
|
|
460
|
+
? this._getClosedMapSize()
|
|
461
|
+
: this._getOpenedMapSize();
|
|
396
462
|
const startMapExtents = mapExtents;
|
|
397
463
|
this.state = {
|
|
398
464
|
startOrigin: core_geometry_1.Point3d.createZero(),
|
|
@@ -414,7 +480,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
414
480
|
view: props.initialView,
|
|
415
481
|
isMoving: false,
|
|
416
482
|
isPanning: false,
|
|
417
|
-
rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined
|
|
483
|
+
rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined
|
|
484
|
+
? props.initialRotateMinimapWithView
|
|
485
|
+
: false,
|
|
418
486
|
};
|
|
419
487
|
}
|
|
420
488
|
/** @internal */
|
|
@@ -427,12 +495,17 @@ class DrawingNavigationAid extends React.Component {
|
|
|
427
495
|
const sz = startMapExtents.interpolate(a, mapExtents);
|
|
428
496
|
const dz = core_geometry_1.Geometry.interpolate(startDrawingZoom, a, drawingZoom);
|
|
429
497
|
const rootStyle = {
|
|
430
|
-
width: sz.x,
|
|
498
|
+
width: sz.x,
|
|
499
|
+
height: sz.y,
|
|
431
500
|
...this.props.style,
|
|
432
501
|
};
|
|
433
502
|
const is3D = this._isViewport3D();
|
|
434
|
-
const tOr = rotateMinimapWithView || is3D
|
|
435
|
-
|
|
503
|
+
const tOr = rotateMinimapWithView || is3D
|
|
504
|
+
? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(or))
|
|
505
|
+
: core_geometry_1.Vector3d.createFrom(or);
|
|
506
|
+
const tMap = rotateMinimapWithView || is3D
|
|
507
|
+
? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(map))
|
|
508
|
+
: core_geometry_1.Vector3d.createFrom(map);
|
|
436
509
|
const tPosX = (tOr.x - extents.x / 2 - tMap.x) * dz + sz.x / 2;
|
|
437
510
|
const tPosY = (-tOr.y - extents.y / 2 + tMap.y) * dz + sz.y / 2;
|
|
438
511
|
const viewWindowStyle = {
|
|
@@ -453,24 +526,34 @@ class DrawingNavigationAid extends React.Component {
|
|
|
453
526
|
rootStyle.right = window.innerWidth - this._rootOffset.right;
|
|
454
527
|
rootStyle.top = this._rootOffset.top;
|
|
455
528
|
}
|
|
456
|
-
const halfExtents = extents.scale(.5);
|
|
457
|
-
const offset = rotateMinimapWithView || is3D
|
|
529
|
+
const halfExtents = extents.scale(0.5);
|
|
530
|
+
const offset = rotateMinimapWithView || is3D
|
|
531
|
+
? core_geometry_1.Vector3d.createZero()
|
|
532
|
+
: rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
|
|
458
533
|
const unrotateLabel = UiIModelComponents_1.UiIModelComponents.translate("drawing.unrotate");
|
|
459
534
|
const e = sz.scale(1 / dz);
|
|
460
|
-
const halfMapExtents = e.scale(.5);
|
|
461
|
-
const mapOffset = rotateMinimapWithView || is3D
|
|
462
|
-
|
|
463
|
-
|
|
535
|
+
const halfMapExtents = e.scale(0.5);
|
|
536
|
+
const mapOffset = rotateMinimapWithView || is3D
|
|
537
|
+
? rotation.multiplyTransposeVector(halfMapExtents)
|
|
538
|
+
: halfMapExtents;
|
|
539
|
+
const viewManager = this.props.viewManagerOverride
|
|
540
|
+
? this.props.viewManagerOverride
|
|
541
|
+
: /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
542
|
+
const screenViewport = this.props.screenViewportOverride
|
|
543
|
+
? this.props.screenViewportOverride
|
|
544
|
+
: /* istanbul ignore next */ core_frontend_1.ScreenViewport;
|
|
464
545
|
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
546
|
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
547
|
React.createElement("div", { className: "drawing-container", "data-testid": "drawing-container", ref: this._viewContainerElement },
|
|
467
548
|
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
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
549
|
+
!is3D && (React.createElement("div", { className: (0, classnames_1.default)("toggle-rotate-style", "icon", {
|
|
550
|
+
checked: rotateMinimapWithView,
|
|
551
|
+
}), "data-testid": "toggle-rotate-style", style: mode === MapMode.Closed && !isAnimating
|
|
552
|
+
? { bottom: 2, left: 2 }
|
|
553
|
+
: {}, title: UiIModelComponents_1.UiIModelComponents.translate("drawing.rotateStyle"), onClick: this._toggleRotationMode, role: "presentation" },
|
|
554
|
+
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRotateLeft, null) }))),
|
|
555
|
+
!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)),
|
|
556
|
+
mode === MapMode.Opened && !isAnimating && (React.createElement(React.Fragment, null,
|
|
474
557
|
React.createElement("div", { className: "close", "data-testid": "drawing-close-button", onClick: this._closeLargeMap, role: "button", tabIndex: -1 },
|
|
475
558
|
React.createElement("div", { className: "close-icon icon" },
|
|
476
559
|
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgSortUp, null) }))),
|
|
@@ -478,8 +561,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
478
561
|
React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-in-button", onClick: this._handleZoomIn, role: "button", tabIndex: -1 },
|
|
479
562
|
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgAdd, null) })),
|
|
480
563
|
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 &&
|
|
564
|
+
React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRemove, null) }))))))));
|
|
565
|
+
if (mode === MapMode.Closed &&
|
|
566
|
+
(animation === 1.0 || startMapExtents.isExactEqual(mapExtents))) {
|
|
483
567
|
return nodes;
|
|
484
568
|
}
|
|
485
569
|
else {
|
|
@@ -517,7 +601,9 @@ class DrawingNavigationAid extends React.Component {
|
|
|
517
601
|
}
|
|
518
602
|
_processWindowDrag(movement) {
|
|
519
603
|
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()
|
|
604
|
+
const offset = this.state.rotateMinimapWithView || this._isViewport3D()
|
|
605
|
+
? this.state.rotation.multiplyTransposeVector(vect)
|
|
606
|
+
: vect;
|
|
521
607
|
const origin = this.state.origin.plus(offset);
|
|
522
608
|
const panningDirection = this._getPanVector();
|
|
523
609
|
const wasAlmostZero = this.state.panningDirection.isAlmostZero;
|
|
@@ -545,7 +631,7 @@ class DrawingNavigationAid extends React.Component {
|
|
|
545
631
|
}
|
|
546
632
|
}
|
|
547
633
|
}
|
|
548
|
-
DrawingNavigationAid._animationFn = (t) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
634
|
+
DrawingNavigationAid._animationFn = (t) => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
549
635
|
/** @internal */
|
|
550
636
|
DrawingNavigationAid.getDefaultClosedMapSize = () => {
|
|
551
637
|
return core_geometry_1.Vector3d.create(96, 96);
|
|
@@ -603,9 +689,13 @@ class DrawingNavigationCanvas extends React.Component {
|
|
|
603
689
|
}
|
|
604
690
|
componentDidMount() {
|
|
605
691
|
if (this._canvasElement.current && this.props.view !== undefined) {
|
|
606
|
-
const viewManager = this.props.viewManagerOverride
|
|
692
|
+
const viewManager = this.props.viewManagerOverride
|
|
693
|
+
? this.props.viewManagerOverride
|
|
694
|
+
: /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
607
695
|
/* istanbul ignore next */
|
|
608
|
-
const screenViewport = this.props.screenViewportOverride
|
|
696
|
+
const screenViewport = this.props.screenViewportOverride
|
|
697
|
+
? this.props.screenViewportOverride
|
|
698
|
+
: /* istanbul ignore next */ core_frontend_1.ScreenViewport;
|
|
609
699
|
const previousView = viewManager.selectedView;
|
|
610
700
|
this._vp = screenViewport.create(this._canvasElement.current, this.props.view);
|
|
611
701
|
this.customizeViewport(this._vp);
|
|
@@ -623,17 +713,27 @@ class DrawingNavigationCanvas extends React.Component {
|
|
|
623
713
|
vp.viewFlags = vp.viewFlags.with("acsTriad", false);
|
|
624
714
|
}
|
|
625
715
|
componentDidUpdate(oldProps) {
|
|
626
|
-
const viewManager = this.props.viewManagerOverride
|
|
716
|
+
const viewManager = this.props.viewManagerOverride
|
|
717
|
+
? this.props.viewManagerOverride
|
|
718
|
+
: /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
627
719
|
if (this.props.view !== undefined) {
|
|
628
720
|
if (oldProps.view !== this.props.view) {
|
|
629
|
-
const screenViewport = this.props.screenViewportOverride
|
|
630
|
-
|
|
721
|
+
const screenViewport = this.props.screenViewportOverride
|
|
722
|
+
? this.props.screenViewportOverride
|
|
723
|
+
: /* istanbul ignore next */ core_frontend_1.ScreenViewport;
|
|
724
|
+
if (oldProps !== undefined &&
|
|
725
|
+
oldProps.viewId !== "" &&
|
|
726
|
+
oldProps.viewId !== this.props.viewId &&
|
|
727
|
+
this._vp) {
|
|
631
728
|
viewManager.dropViewport(this._vp, true);
|
|
632
729
|
}
|
|
633
730
|
// istanbul ignore else
|
|
634
731
|
if (this._canvasElement.current &&
|
|
635
732
|
(this.props.canvasSizeOverride ||
|
|
636
|
-
|
|
733
|
+
/* istanbul ignore next */ (this._canvasElement.current
|
|
734
|
+
.clientWidth !== 0 &&
|
|
735
|
+
/* istanbul ignore next */ this._canvasElement.current
|
|
736
|
+
.clientHeight !== 0))) {
|
|
637
737
|
const previousView = viewManager.selectedView;
|
|
638
738
|
this._vp = screenViewport.create(this._canvasElement.current, this.props.view.clone());
|
|
639
739
|
this.customizeViewport(this._vp);
|
|
@@ -642,14 +742,19 @@ class DrawingNavigationCanvas extends React.Component {
|
|
|
642
742
|
this._update();
|
|
643
743
|
}
|
|
644
744
|
}
|
|
645
|
-
else if (!this.props.origin.isExactEqual(oldProps.origin) ||
|
|
745
|
+
else if (!this.props.origin.isExactEqual(oldProps.origin) ||
|
|
746
|
+
!this.props.extents.isExactEqual(oldProps.extents) ||
|
|
747
|
+
this.props.zoom !== oldProps.zoom ||
|
|
748
|
+
!this.props.rotation.isExactEqual(oldProps.rotation)) {
|
|
646
749
|
this._update();
|
|
647
750
|
}
|
|
648
751
|
}
|
|
649
752
|
}
|
|
650
753
|
componentWillUnmount() {
|
|
651
754
|
if (this._vp) {
|
|
652
|
-
const viewManager = this.props.viewManagerOverride
|
|
755
|
+
const viewManager = this.props.viewManagerOverride
|
|
756
|
+
? this.props.viewManagerOverride
|
|
757
|
+
: /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
|
|
653
758
|
viewManager.dropViewport(this._vp, true);
|
|
654
759
|
}
|
|
655
760
|
}
|