@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawingNavigationAid.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/navigationaids/DrawingNavigationAid.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,6BAA6B,CAAC;AAErC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"DrawingNavigationAid.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/navigationaids/DrawingNavigationAid.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,6BAA6B,CAAC;AAErC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAGL,QAAQ,EACR,OAAO,EACP,OAAO,EAEP,QAAQ,EACT,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA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AiB;IAEb,MAAM,IAAI,KAAK,CAAC,SAAS;IAUzB,iBAAiB;IAqBjC,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,OAAO,CAUb;IAEc,kBAAkB,CAAC,QAAQ,EAAE,4BAA4B;IA+CzD,oBAAoB;CAQrC"}
|
|
@@ -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
|
}
|