@itwin/imodel-components-react 4.13.3 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +1 -2
- 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 +0 -16
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
- 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 +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +0 -1
- 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 +0 -4
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.js +0 -21
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +0 -25
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.js +0 -1
- package/lib/cjs/imodel-components-react/color/Swatch.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 +2 -13
- 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 +2 -11
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +0 -6
- 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 +1 -15
- 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 +0 -1
- 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 +0 -9
- 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 +0 -1
- 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 +1 -27
- 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 +9 -34
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.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 +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.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 +2 -6
- 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 +2 -12
- 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 +2 -7
- 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 +0 -7
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.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 +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.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 +0 -1
- 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 +2 -5
- 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 +6 -12
- 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 +0 -1
- 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 +2 -10
- 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 +0 -2
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +0 -6
- package/lib/cjs/imodel-components-react/timeline/Scrubber.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 +0 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +0 -17
- 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 +0 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js +1 -2
- 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 +0 -16
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
- 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 +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +0 -1
- 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 +0 -4
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.js +0 -21
- package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.js +0 -25
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.js +0 -1
- package/lib/esm/imodel-components-react/color/Swatch.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 +2 -13
- 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 +2 -11
- package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js +0 -6
- 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 +1 -15
- 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 +0 -1
- 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 +0 -9
- 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 +0 -1
- 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 +1 -27
- 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 +9 -34
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.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 +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.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 +2 -6
- 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 +2 -12
- 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 +2 -7
- 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 +0 -7
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.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 +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.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 +0 -1
- 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 +2 -5
- 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 +6 -12
- 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 +0 -1
- 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 +2 -10
- 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 +0 -2
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +0 -6
- package/lib/esm/imodel-components-react/timeline/Scrubber.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 +0 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +0 -17
- 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 +0 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/package.json +13 -15
|
@@ -158,7 +158,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
158
158
|
this._handleViewRotationChangeEvent = (args // eslint-disable-line deprecation/deprecation
|
|
159
159
|
) => {
|
|
160
160
|
const { animation, dragging, endRotMatrix } = this.state;
|
|
161
|
-
// istanbul ignore else
|
|
162
161
|
if (this.props.viewport === args.viewport && animation >= 1 && !dragging) {
|
|
163
162
|
const newMatrix = this.props.viewport.view.getRotation().clone();
|
|
164
163
|
if (!endRotMatrix.isAlmostEqual(newMatrix)) {
|
|
@@ -177,10 +176,7 @@ class CubeNavigationAid extends React.Component {
|
|
|
177
176
|
this._lastTime = t;
|
|
178
177
|
if (this.state.animation !== 1) {
|
|
179
178
|
const animation = Math.min(1, this.state.animation +
|
|
180
|
-
delta /
|
|
181
|
-
(1000 *
|
|
182
|
-
(this.props.animationTime || /* istanbul ignore next */ 0.4)));
|
|
183
|
-
// istanbul ignore next
|
|
179
|
+
delta / (1000 * (this.props.animationTime || 0.4)));
|
|
184
180
|
if (this._mounted) {
|
|
185
181
|
this.setState({ animation }, () => {
|
|
186
182
|
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
@@ -195,10 +191,8 @@ class CubeNavigationAid extends React.Component {
|
|
|
195
191
|
this._animationEnd = () => {
|
|
196
192
|
ViewportComponentEvents_1.ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, this.state.face, true);
|
|
197
193
|
const startRotMatrix = this.state.endRotMatrix.clone();
|
|
198
|
-
// istanbul ignore next
|
|
199
194
|
if (this._mounted) {
|
|
200
195
|
this.setState({ startRotMatrix }, () => {
|
|
201
|
-
// istanbul ignore else
|
|
202
196
|
if (this.props.onAnimationEnd)
|
|
203
197
|
this.props.onAnimationEnd();
|
|
204
198
|
});
|
|
@@ -223,7 +217,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
223
217
|
};
|
|
224
218
|
this._onArrowClick = (arrow) => {
|
|
225
219
|
if (this._isInteractionLocked()) {
|
|
226
|
-
// istanbul ignore next
|
|
227
220
|
this.props.onAnimationEnd?.();
|
|
228
221
|
return;
|
|
229
222
|
}
|
|
@@ -256,7 +249,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
256
249
|
window.removeEventListener("mousemove", this._onMouseMove);
|
|
257
250
|
window.removeEventListener("mouseup", this._onMouseUp);
|
|
258
251
|
};
|
|
259
|
-
// istanbul ignore next - unable to test touch
|
|
260
252
|
this._handleBoxTouchStart = (event) => {
|
|
261
253
|
if (this._isInteractionLocked()) {
|
|
262
254
|
this.props.onAnimationEnd?.();
|
|
@@ -269,14 +261,12 @@ class CubeNavigationAid extends React.Component {
|
|
|
269
261
|
this._lastClientXY = core_geometry_1.Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);
|
|
270
262
|
this._start = this._lastClientXY;
|
|
271
263
|
};
|
|
272
|
-
// istanbul ignore next - unable to test touch
|
|
273
264
|
this._onTouchMove = (event) => {
|
|
274
265
|
if (1 !== event.targetTouches.length)
|
|
275
266
|
return;
|
|
276
267
|
const mousePos = core_geometry_1.Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);
|
|
277
268
|
this._processDrag(mousePos);
|
|
278
269
|
};
|
|
279
|
-
// istanbul ignore next - unable to test touch
|
|
280
270
|
this._onTouchEnd = (event) => {
|
|
281
271
|
if (0 !== event.targetTouches.length)
|
|
282
272
|
return;
|
|
@@ -294,13 +284,11 @@ class CubeNavigationAid extends React.Component {
|
|
|
294
284
|
}
|
|
295
285
|
const { endRotMatrix } = this.state;
|
|
296
286
|
let rotMatrix = core_geometry_1.Matrix3d.createRigidViewAxesZTowardsEye(pos.x, pos.y, pos.z).inverse();
|
|
297
|
-
// istanbul ignore else
|
|
298
287
|
if (rotMatrix) {
|
|
299
288
|
// if isMatrixFace and user is clicking on top/bottom, the current matrix face must be top or bottom
|
|
300
289
|
if (!CubeNavigationAid._isMatrixFace(endRotMatrix) &&
|
|
301
290
|
(face === Cube_1.Face.Top || face === Cube_1.Face.Bottom)) {
|
|
302
291
|
const angleAxis = endRotMatrix.getAxisAndAngleOfRotation();
|
|
303
|
-
// istanbul ignore else
|
|
304
292
|
if (angleAxis.ok) {
|
|
305
293
|
const xAx = endRotMatrix.columnX();
|
|
306
294
|
const a = Math.atan2(xAx.y, xAx.x);
|
|
@@ -364,7 +352,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
364
352
|
ViewportComponentEvents_1.ViewportComponentEvents.setCubeMatrix(rotMatrix, Cube_1.Face.None);
|
|
365
353
|
const faces = {};
|
|
366
354
|
for (const key in this._labels) {
|
|
367
|
-
// istanbul ignore else
|
|
368
355
|
if (this._labels.hasOwnProperty(key)) {
|
|
369
356
|
const f = key;
|
|
370
357
|
const label = this._labels[f];
|
|
@@ -402,7 +389,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
402
389
|
const yy = y === -0 ? Math.abs(y) : y;
|
|
403
390
|
const zz = z === -0 ? Math.abs(z) : z;
|
|
404
391
|
// adjust any adjacent pair of near equal values to the first.
|
|
405
|
-
// istanbul ignore next
|
|
406
392
|
if (core_geometry_1.Geometry.isSameCoordinate(xx, yy, tolerance)) {
|
|
407
393
|
y = core_geometry_1.Geometry.split3WaySign(y, -xx, xx, xx);
|
|
408
394
|
}
|
|
@@ -430,7 +416,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
430
416
|
// special case this to take x direction from the input.
|
|
431
417
|
// This methodology results in always "righting" the face when rotation from an upside-down cube.
|
|
432
418
|
// The behavior was made opt-in in response to https://github.com/iTwin/appui/issues/259
|
|
433
|
-
// istanbul ignore next
|
|
434
419
|
if (!headsUp || (newZ.x === 0.0 && newZ.y === 0)) {
|
|
435
420
|
const perpVector = worldToView.rowX();
|
|
436
421
|
result = core_geometry_1.Matrix3d.createRigidFromColumns(newZ, perpVector, core_geometry_1.AxisOrder.ZXY, result);
|
|
@@ -438,7 +423,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
438
423
|
else {
|
|
439
424
|
result = core_geometry_1.Matrix3d.createRigidViewAxesZTowardsEye(newZ.x, newZ.y, newZ.z, result);
|
|
440
425
|
}
|
|
441
|
-
// istanbul ignore else
|
|
442
426
|
if (result)
|
|
443
427
|
result.transposeInPlace();
|
|
444
428
|
return result;
|
|
@@ -470,7 +454,6 @@ class CubeNavigationAid extends React.Component {
|
|
|
470
454
|
return this._labels[face];
|
|
471
455
|
}
|
|
472
456
|
_processDrag(mousePos) {
|
|
473
|
-
// istanbul ignore else
|
|
474
457
|
if (!this._start.isAlmostEqual(mousePos)) {
|
|
475
458
|
const movement = mousePos.minus(this._lastClientXY);
|
|
476
459
|
const diff = movement.scale(0.05);
|
|
@@ -504,34 +487,28 @@ CubeNavigationAid._getMatrixFace = (rotMatrix) => {
|
|
|
504
487
|
if (!CubeNavigationAid._isMatrixFace(rotMatrix)) {
|
|
505
488
|
return Cube_1.Face.None;
|
|
506
489
|
}
|
|
507
|
-
// istanbul ignore else
|
|
508
490
|
if (rotMatrix.coffs[6] === cubeNavigationFaceRotations[Cube_1.Face.Top].coffs[6] &&
|
|
509
491
|
rotMatrix.coffs[7] === cubeNavigationFaceRotations[Cube_1.Face.Top].coffs[7] &&
|
|
510
492
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Top].coffs[8])
|
|
511
493
|
return Cube_1.Face.Top;
|
|
512
|
-
// istanbul ignore else
|
|
513
494
|
if (rotMatrix.coffs[6] ===
|
|
514
495
|
cubeNavigationFaceRotations[Cube_1.Face.Bottom].coffs[6] &&
|
|
515
496
|
rotMatrix.coffs[7] ===
|
|
516
497
|
cubeNavigationFaceRotations[Cube_1.Face.Bottom].coffs[7] &&
|
|
517
498
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Bottom].coffs[8])
|
|
518
499
|
return Cube_1.Face.Bottom;
|
|
519
|
-
// istanbul ignore else
|
|
520
500
|
if (rotMatrix.coffs[6] === cubeNavigationFaceRotations[Cube_1.Face.Left].coffs[6] &&
|
|
521
501
|
rotMatrix.coffs[7] === cubeNavigationFaceRotations[Cube_1.Face.Left].coffs[7] &&
|
|
522
502
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Left].coffs[8])
|
|
523
503
|
return Cube_1.Face.Left;
|
|
524
|
-
// istanbul ignore else
|
|
525
504
|
if (rotMatrix.coffs[6] === cubeNavigationFaceRotations[Cube_1.Face.Right].coffs[6] &&
|
|
526
505
|
rotMatrix.coffs[7] === cubeNavigationFaceRotations[Cube_1.Face.Right].coffs[7] &&
|
|
527
506
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Right].coffs[8])
|
|
528
507
|
return Cube_1.Face.Right;
|
|
529
|
-
// istanbul ignore else
|
|
530
508
|
if (rotMatrix.coffs[6] === cubeNavigationFaceRotations[Cube_1.Face.Back].coffs[6] &&
|
|
531
509
|
rotMatrix.coffs[7] === cubeNavigationFaceRotations[Cube_1.Face.Back].coffs[7] &&
|
|
532
510
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Back].coffs[8])
|
|
533
511
|
return Cube_1.Face.Back;
|
|
534
|
-
// istanbul ignore else
|
|
535
512
|
if (rotMatrix.coffs[6] === cubeNavigationFaceRotations[Cube_1.Face.Front].coffs[6] &&
|
|
536
513
|
rotMatrix.coffs[7] === cubeNavigationFaceRotations[Cube_1.Face.Front].coffs[7] &&
|
|
537
514
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Front].coffs[8])
|
|
@@ -546,17 +523,14 @@ CubeNavigationAid._interpolateRotMatrix = (start, anim, end) => {
|
|
|
546
523
|
const startInverse = start.transpose();
|
|
547
524
|
const diff = end.multiplyMatrixMatrix(startInverse);
|
|
548
525
|
const angleAxis = diff.getAxisAndAngleOfRotation();
|
|
549
|
-
// istanbul ignore else
|
|
550
526
|
if (angleAxis.ok) {
|
|
551
527
|
const angle = core_geometry_1.Angle.createRadians(angleAxis.angle.radians * CubeNavigationAid._animationFn(anim));
|
|
552
528
|
const newDiff = core_geometry_1.Matrix3d.createRotationAroundVector(angleAxis.axis, angle);
|
|
553
|
-
// istanbul ignore else
|
|
554
529
|
if (newDiff) {
|
|
555
530
|
const newMatrix = newDiff.multiplyMatrixMatrix(start);
|
|
556
531
|
return newMatrix;
|
|
557
532
|
}
|
|
558
533
|
}
|
|
559
|
-
// istanbul ignore next
|
|
560
534
|
return end;
|
|
561
535
|
};
|
|
562
536
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeNavigationAid.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/navigationaids/CubeNavigationAid.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oCAAkC;AAClC,4DAAoC;AACpC,6CAA+B;AAE/B,wDAS8B;AAE9B,wDAAiD;AAEjD,kDAAyC;AACzC,8DAA2D;AAE3D,iFAA8E;AAC9E,iCAAoC;AACpC,oEAKoC;AAEpC,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,mEAAS,CAAA;IACT,kEAAS,CAAA;AACX,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,iEAAQ,CAAA;IACR,oEAAU,CAAA;AACZ,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,+DAAO,CAAA;IACP,sEAAW,CAAA;AACb,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AASD,MAAM,sBAAsB,GAAgC;IAC1D,CAAC,WAAI,CAAC,IAAI,CAA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AY,GAA8B;IAC9C,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,SAAS;IACvB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW;IAC3B,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW;IAC3B,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,YAAY;CAC9B,CAAC;AAUF,MAAM,aAAc,SAAQ,KAAK,CAAC,SAAuB;IAAzD;;QAwBU,iBAAY,GAAG,CAAC,KAAuB,EAAE,EAAE;YACjD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACnC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IACJ,CAAC;IA5BiB,MAAM;QACpB,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3E,MAAM,OAAO,GAAG,IAAA,oBAAU,EACxB,cAAc,EACd,MAAM,EACN,YAAY,CAAC,WAAW,CAAC,EACzB,OAAO,IAAI,cAAc,CAC1B,CAAC;QAEF,OAAO;QACL,iEAAiE;QACjE,6BACE,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAE,KAAK,KACR,KAAK,EACT,OAAO,EAAE,IAAI,CAAC,YAAY;YAE1B,oBAAC,iBAAI,IAAC,QAAQ,EAAE,eAAe,CAAC,WAAW,CAAC,GAAI;YAAC,GAAG,CAChD,CACP,CAAC;IACJ,CAAC;CAMF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NavigationAids\n */\n\nimport \"./CubeNavigationAid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { XYAndZ } from \"@itwin/core-geometry\";\nimport {\n Angle,\n AxisIndex,\n AxisOrder,\n Geometry,\n Matrix3d,\n Point2d,\n Vector2d,\n Vector3d,\n} from \"@itwin/core-geometry\";\nimport type { IModelConnection, Viewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { CommonProps, IconSpec } from \"@itwin/core-react\";\nimport { Icon } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport type { ViewRotationChangeEventArgs } from \"../viewport/ViewportComponentEvents\";\nimport { ViewportComponentEvents } from \"../viewport/ViewportComponentEvents\";\nimport { Cube, Face } from \"./Cube\";\nimport {\n SvgCaretDown,\n SvgCaretLeft,\n SvgCaretRight,\n SvgCaretUp,\n} from \"@itwin/itwinui-icons-react\";\n\n/** @public */\nexport enum CubeNavigationHitBoxX {\n None = 0,\n Right = 1,\n Left = -1,\n}\n\n/** @public */\nexport enum CubeNavigationHitBoxY {\n None = 0,\n Back = 1,\n Front = -1,\n}\n\n/** @public */\nexport enum CubeNavigationHitBoxZ {\n None = 0,\n Top = 1,\n Bottom = -1,\n}\n\ninterface CubeNavigationRotationMap {\n up: Face;\n down: Face;\n left: Face;\n right: Face;\n}\n\nconst cubeNavigationFaceLocs: { [key: string]: Vector3d } = {\n [Face.Left]: Vector3d.create(\n CubeNavigationHitBoxX.Left,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Right]: Vector3d.create(\n CubeNavigationHitBoxX.Right,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Back]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.Back,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Front]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.Front,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Bottom]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.Bottom\n ),\n [Face.Top]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.Top\n ),\n};\n\nconst cubeNavigationFaceRotations: { [key: string]: Matrix3d } = {\n [Face.Left]: Matrix3d.createRowValues(0, -1, 0, 0, 0, 1, -1, 0, 0),\n [Face.Right]: Matrix3d.createRowValues(0, 1, 0, 0, 0, 1, 1, 0, 0),\n [Face.Back]: Matrix3d.createRowValues(-1, 0, 0, 0, 0, 1, 0, 1, 0),\n [Face.Front]: Matrix3d.createRowValues(1, 0, 0, 0, 0, 1, 0, -1, 0),\n [Face.Bottom]: Matrix3d.createRowValues(1, 0, 0, 0, -1, 0, 0, 0, -1),\n [Face.Top]: Matrix3d.createRowValues(1, 0, 0, 0, 1, 0, 0, 0, 1),\n};\n\n// data relating Up/Down/Left/Right directions relative to every surface\nconst cubeNavigationRoutes: { [key: string]: CubeNavigationRotationMap } = {\n [Face.Front]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Left,\n right: Face.Right,\n },\n [Face.Back]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Right,\n right: Face.Left,\n },\n [Face.Top]: {\n up: Face.Back,\n down: Face.Front,\n left: Face.Left,\n right: Face.Right,\n },\n [Face.Bottom]: {\n up: Face.Front,\n down: Face.Back,\n left: Face.Left,\n right: Face.Right,\n },\n [Face.Right]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Front,\n right: Face.Back,\n },\n [Face.Left]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Back,\n right: Face.Front,\n },\n};\n\n/** The default tolerance (1.0e-6) is appropriate if very dirty viewing operations are expected. */\nconst DEFAULT_TOLERANCE = 1.0e-6;\n\n/** @internal */\nexport enum CubeHover {\n None = 0,\n Hover,\n Active,\n}\n\n/** Properties for the [[CubeNavigationAid]] component\n * @public\n */\nexport interface CubeNavigationAidProps extends CommonProps {\n iModelConnection: IModelConnection;\n viewport?: Viewport;\n\n // used only in testing\n\n /** @internal */\n onAnimationEnd?: () => void;\n /** @internal */\n animationTime?: number;\n favorHeadsUpRotation?: boolean;\n}\n\n/** @public */\ninterface CubeNavigationAidState {\n dragging: boolean;\n startRotMatrix: Matrix3d;\n endRotMatrix: Matrix3d;\n animation: number;\n hoverMap: { [key: string]: CubeHover };\n face: Face;\n}\n\n/** Cube Navigation Aid Component\n * @public\n */\nexport class CubeNavigationAid extends React.Component<\n CubeNavigationAidProps,\n CubeNavigationAidState\n> {\n private _start: Vector2d = Vector2d.createZero();\n /** @internal */\n public override readonly state: Readonly<CubeNavigationAidState> = {\n dragging: false,\n startRotMatrix: Matrix3d.createIdentity(),\n endRotMatrix: Matrix3d.createIdentity(),\n animation: 1,\n hoverMap: {},\n face: Face.Top,\n };\n\n private _lastTime: number | undefined;\n private _animationFrame: any;\n private _mounted: boolean = false;\n private _labels: { [key: string]: string } = {\n [Face.Right]: UiIModelComponents.translate(\"cube.right\"),\n [Face.Left]: UiIModelComponents.translate(\"cube.left\"),\n [Face.Back]: UiIModelComponents.translate(\"cube.back\"),\n [Face.Front]: UiIModelComponents.translate(\"cube.front\"),\n [Face.Top]: UiIModelComponents.translate(\"cube.top\"),\n [Face.Bottom]: UiIModelComponents.translate(\"cube.bottom\"),\n };\n\n /** @internal */\n public override componentDidMount() {\n this._mounted = true;\n ViewportComponentEvents.onViewRotationChangeEvent.addListener(\n this._handleViewRotationChangeEvent\n );\n\n // set initial rotation\n if (this.props.viewport) {\n const newMatrix = this.props.viewport.view.getRotation().clone();\n this.setState({\n startRotMatrix: newMatrix,\n endRotMatrix: newMatrix,\n animation: 1,\n });\n }\n }\n\n /** @internal */\n public override componentWillUnmount() {\n ViewportComponentEvents.onViewRotationChangeEvent.removeListener(\n this._handleViewRotationChangeEvent\n );\n clearTimeout(this._animationFrame);\n this._mounted = false;\n }\n\n // Synchronize with rotation coming from the Viewport\n private _handleViewRotationChangeEvent = (\n args: ViewRotationChangeEventArgs // eslint-disable-line deprecation/deprecation\n ) => {\n const { animation, dragging, endRotMatrix } = this.state;\n // istanbul ignore else\n if (this.props.viewport === args.viewport && animation >= 1 && !dragging) {\n const newMatrix = this.props.viewport.view.getRotation().clone();\n if (!endRotMatrix.isAlmostEqual(newMatrix)) {\n this.setState({\n startRotMatrix: newMatrix,\n endRotMatrix: newMatrix,\n animation: 1,\n face: Face.None,\n });\n }\n }\n };\n\n private _animation = () => {\n const t = Date.now();\n const delta = this._lastTime ? t - this._lastTime : 16;\n this._lastTime = t;\n if (this.state.animation !== 1) {\n const animation = Math.min(\n 1,\n this.state.animation +\n delta /\n (1000 *\n (this.props.animationTime || /* istanbul ignore next */ 0.4))\n );\n\n // istanbul ignore next\n if (this._mounted) {\n this.setState({ animation }, () => {\n this._animationFrame = setTimeout(this._animation, 16.667);\n });\n }\n } else {\n this._lastTime = undefined;\n this._animationEnd();\n }\n };\n\n private _animationEnd = () => {\n ViewportComponentEvents.setCubeMatrix(\n this.state.endRotMatrix,\n this.state.face,\n true\n );\n const startRotMatrix = this.state.endRotMatrix.clone();\n // istanbul ignore next\n if (this._mounted) {\n this.setState({ startRotMatrix }, () => {\n // istanbul ignore else\n if (this.props.onAnimationEnd) this.props.onAnimationEnd();\n });\n }\n };\n\n private static _animationFn = (t: number) =>\n t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;\n\n private static _isMatrixFace = (matrix: Matrix3d): boolean => {\n let sum = 0;\n for (const coff of matrix.coffs) {\n if (Geometry.isAlmostEqualNumber(Math.abs(coff), 1)) sum++;\n }\n // Assuming matrix is a proper rotation matrix:\n // if matrix viewing a face, there will be a total of 3 values either almost -1, or almost 1.\n return sum === 3;\n };\n\n public override render(): React.ReactNode {\n const { animation, startRotMatrix, endRotMatrix } = this.state;\n const visible =\n CubeNavigationAid._isMatrixFace(endRotMatrix) && animation === 1.0;\n const rotMatrix = CubeNavigationAid._interpolateRotMatrix(\n startRotMatrix,\n animation,\n endRotMatrix\n );\n if (rotMatrix !== startRotMatrix && rotMatrix !== endRotMatrix)\n ViewportComponentEvents.setCubeMatrix(rotMatrix, Face.None);\n\n const faces: { [key: string]: React.ReactNode } = {};\n for (const key in this._labels) {\n // istanbul ignore else\n if (this._labels.hasOwnProperty(key)) {\n const f = key as Face;\n const label = this._labels[f];\n faces[f] = (\n <NavCubeFace\n face={f}\n label={label}\n hoverMap={this.state.hoverMap}\n onFaceCellClick={this._handleFaceCellClick}\n onFaceCellHoverChange={this._handleCellHoverChange}\n />\n );\n }\n }\n\n const cubeClassNames = classnames(\n \"nav-cube\",\n this.state.dragging && \"cube-dragging\"\n );\n\n const upTitle = this.getArrowTitle(Pointer.Up);\n const downTitle = this.getArrowTitle(Pointer.Down);\n const leftTitle = this.getArrowTitle(Pointer.Left);\n const rightTitle = this.getArrowTitle(Pointer.Right);\n\n return (\n <div\n className={classnames(\n \"components-cube-container\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"components-cube-navigation-aid\"\n onMouseDown={this._handleBoxMouseDown}\n onTouchStart={this._handleBoxTouchStart}\n role=\"presentation\"\n >\n <div className={\"cube-element-container\"}>\n <Cube\n className={cubeClassNames}\n rotMatrix={rotMatrix}\n faces={faces}\n />\n </div>\n <PointerButton\n data-testid=\"cube-pointer-button-up\"\n visible={visible}\n pointerType={Pointer.Up}\n onArrowClick={this._onArrowClick}\n title={upTitle}\n />\n <PointerButton\n data-testid=\"cube-pointer-button-down\"\n visible={visible}\n pointerType={Pointer.Down}\n onArrowClick={this._onArrowClick}\n title={downTitle}\n />\n <PointerButton\n data-testid=\"cube-pointer-button-left\"\n visible={visible}\n pointerType={Pointer.Left}\n onArrowClick={this._onArrowClick}\n title={leftTitle}\n />\n <PointerButton\n data-testid=\"cube-pointer-button-right\"\n visible={visible}\n pointerType={Pointer.Right}\n onArrowClick={this._onArrowClick}\n title={rightTitle}\n />\n </div>\n );\n }\n\n private _handleCellHoverChange = (vect: Vector3d, state: CubeHover) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n const hoverMap = this.state.hoverMap;\n hoverMap[`${vect.x}-${vect.y}-${vect.z}`] = state;\n this.setState({ hoverMap });\n };\n\n private _isInteractionLocked = () => {\n // Locked by markup\n if (\n undefined !== this.props.viewport &&\n this.props.viewport === IModelApp.toolAdmin.markupView\n ) {\n return true;\n }\n return false;\n };\n\n private static _getMatrixFace = (rotMatrix: Matrix3d): Face => {\n if (!CubeNavigationAid._isMatrixFace(rotMatrix)) {\n return Face.None;\n }\n\n // istanbul ignore else\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Top].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Top].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Top].coffs[8]\n )\n return Face.Top;\n\n // istanbul ignore else\n if (\n rotMatrix.coffs[6] ===\n cubeNavigationFaceRotations[Face.Bottom].coffs[6] &&\n rotMatrix.coffs[7] ===\n cubeNavigationFaceRotations[Face.Bottom].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Bottom].coffs[8]\n )\n return Face.Bottom;\n\n // istanbul ignore else\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Left].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Left].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Left].coffs[8]\n )\n return Face.Left;\n\n // istanbul ignore else\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Right].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Right].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Right].coffs[8]\n )\n return Face.Right;\n\n // istanbul ignore else\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Back].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Back].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Back].coffs[8]\n )\n return Face.Back;\n\n // istanbul ignore else\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Front].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Front].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Front].coffs[8]\n )\n return Face.Front;\n\n return Face.None;\n };\n\n private static _interpolateRotMatrix = (\n start: Matrix3d,\n anim: number,\n end: Matrix3d\n ): Matrix3d => {\n if (anim === 0) return start;\n if (anim === 1 || start.isAlmostEqual(end)) return end;\n const startInverse = start.transpose();\n const diff = end.multiplyMatrixMatrix(startInverse);\n const angleAxis = diff.getAxisAndAngleOfRotation();\n // istanbul ignore else\n if (angleAxis.ok) {\n const angle = Angle.createRadians(\n angleAxis.angle.radians * CubeNavigationAid._animationFn(anim)\n );\n const newDiff = Matrix3d.createRotationAroundVector(\n angleAxis.axis,\n angle\n );\n // istanbul ignore else\n if (newDiff) {\n const newMatrix = newDiff.multiplyMatrixMatrix(start);\n return newMatrix;\n }\n }\n // istanbul ignore next\n return end;\n };\n\n private static correctSmallNumber(value: number, tolerance: number): number {\n return Math.abs(value) < tolerance ? 0 : value;\n }\n\n /**\n * Snap coordinates of a vector to zero and to each other so that the vector prefers to be\n * * perpendicular to a face of the unit cube.\n * * or pass through a nearby vertex or edge of the unit cube.\n * @param zVector existing z vector.\n * @param tolerance tolerance to determine if a z vector component is close to zero or 1.\n */\n private static snapVectorToCubeFeatures(\n zVector: XYAndZ,\n tolerance: number\n ): Vector3d {\n const x = CubeNavigationAid.correctSmallNumber(zVector.x, tolerance);\n let y = CubeNavigationAid.correctSmallNumber(zVector.y, tolerance);\n let z = CubeNavigationAid.correctSmallNumber(zVector.z, tolerance);\n\n const xx = x === -0 ? Math.abs(x) : x;\n const yy = y === -0 ? Math.abs(y) : y;\n const zz = z === -0 ? Math.abs(z) : z;\n\n // adjust any adjacent pair of near equal values to the first.\n // istanbul ignore next\n if (Geometry.isSameCoordinate(xx, yy, tolerance)) {\n y = Geometry.split3WaySign(y, -xx, xx, xx);\n }\n if (Geometry.isSameCoordinate(yy, zz, tolerance)) {\n z = Geometry.split3WaySign(z, -yy, yy, yy);\n }\n if (Geometry.isSameCoordinate(xx, zz, tolerance)) {\n z = Geometry.split3WaySign(z, -xx, xx, xx);\n }\n return Vector3d.create(x, y, z);\n }\n\n /**\n * Adjust a worldToView matrix to favor both\n * * direct view at faces, edges, and corners of a view cube.\n * * heads up\n * @param worldToView candidate matrix\n * @param tolerance tolerance for cleaning up fuzz. The default (1.0e-6) is appropriate if very dirty viewing operations are expected.\n * @param result optional result.\n */\n private static snapWorldToViewMatrixToCubeFeatures(\n worldToView: Matrix3d,\n tolerance: number,\n result?: Matrix3d,\n favorHeadsUpRotation?: boolean\n ): Matrix3d {\n const oldZ = worldToView.rowZ();\n const newZ = CubeNavigationAid.snapVectorToCubeFeatures(oldZ, tolerance);\n const headsUp = !!favorHeadsUpRotation;\n // If newZ is true up or down, it will have true 0 for x and y.\n // special case this to take x direction from the input.\n // This methodology results in always \"righting\" the face when rotation from an upside-down cube.\n // The behavior was made opt-in in response to https://github.com/iTwin/appui/issues/259\n // istanbul ignore next\n if (!headsUp || (newZ.x === 0.0 && newZ.y === 0)) {\n const perpVector = worldToView.rowX();\n result = Matrix3d.createRigidFromColumns(\n newZ,\n perpVector,\n AxisOrder.ZXY,\n result\n )!;\n } else {\n result = Matrix3d.createRigidViewAxesZTowardsEye(\n newZ.x,\n newZ.y,\n newZ.z,\n result\n );\n }\n // istanbul ignore else\n if (result) result.transposeInPlace();\n return result;\n }\n\n private getArrowRotationAndFace(arrow: Pointer): {\n newRotation: Matrix3d;\n face: Face;\n } {\n const localRotationAxis = Vector3d.create(0, 0, 0);\n switch (arrow) {\n case Pointer.Up:\n localRotationAxis.x = -1.0;\n break;\n case Pointer.Down:\n localRotationAxis.x = 1.0;\n break;\n case Pointer.Left:\n localRotationAxis.y = -1.0;\n break;\n default:\n localRotationAxis.y = 1.0;\n break;\n }\n const localRotation = Matrix3d.createRotationAroundVector(\n localRotationAxis,\n Angle.createDegrees(-90)\n )!;\n const newRotation = localRotation.multiplyMatrixMatrix(\n this.state.endRotMatrix\n );\n CubeNavigationAid.snapWorldToViewMatrixToCubeFeatures(\n newRotation,\n DEFAULT_TOLERANCE,\n newRotation,\n this.props.favorHeadsUpRotation\n );\n const face = CubeNavigationAid._getMatrixFace(newRotation);\n return { newRotation, face };\n }\n\n private _onArrowClick = (arrow: Pointer) => {\n if (this._isInteractionLocked()) {\n // istanbul ignore next\n this.props.onAnimationEnd?.();\n return;\n }\n const { newRotation, face } = this.getArrowRotationAndFace(arrow);\n this._animateRotation(newRotation, face);\n };\n\n private getArrowTitle(arrow: Pointer) {\n const { face } = this.getArrowRotationAndFace(arrow);\n return this._labels[face];\n }\n\n private _lastClientXY: Vector2d = Vector2d.createZero();\n private _processDrag(mousePos: Vector2d) {\n // istanbul ignore else\n if (!this._start.isAlmostEqual(mousePos)) {\n const movement = mousePos.minus(this._lastClientXY);\n const diff = movement.scale(0.05);\n\n const yaw = Angle.createRadians(diff.x);\n const pitch = Angle.createRadians(diff.y);\n\n const matX = Matrix3d.createRotationAroundAxisIndex(AxisIndex.X, pitch);\n const matZ = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, yaw);\n\n const mat = matX\n .multiplyMatrixMatrix(this.state.startRotMatrix)\n .multiplyMatrixMatrix(matZ);\n this._setRotation(mat, CubeNavigationAid._getMatrixFace(mat));\n if (!this.state.dragging) this.setState({ dragging: true });\n }\n this._lastClientXY = mousePos;\n }\n\n private _handleBoxMouseDown = (event: any) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n event.preventDefault();\n // only start listening after drag is confirmed. Ie. the 3D box is clicked.\n window.addEventListener(\"mousemove\", this._onMouseMove, false);\n window.addEventListener(\"mouseup\", this._onMouseUp, false);\n this._lastClientXY = Vector2d.create(event.clientX, event.clientY);\n this._start = this._lastClientXY;\n };\n\n private _onMouseMove = (event: MouseEvent) => {\n const mousePos = Vector2d.create(event.clientX, event.clientY);\n this._processDrag(mousePos);\n };\n\n private _onMouseUp = () => {\n if (this.state.dragging) {\n this.setState({ dragging: false });\n ViewportComponentEvents.setCubeMatrix(\n this.state.endRotMatrix,\n CubeNavigationAid._getMatrixFace(this.state.endRotMatrix),\n true\n );\n }\n\n // remove so event only triggers after this.onMouseStartDrag\n window.removeEventListener(\"mousemove\", this._onMouseMove);\n window.removeEventListener(\"mouseup\", this._onMouseUp);\n };\n\n // istanbul ignore next - unable to test touch\n private _handleBoxTouchStart = (event: any) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n if (1 !== event.targetTouches.length) return;\n window.addEventListener(\"touchmove\", this._onTouchMove, false);\n window.addEventListener(\"touchend\", this._onTouchEnd, false);\n this._lastClientXY = Vector2d.create(\n event.targetTouches[0].clientX,\n event.targetTouches[0].clientY\n );\n this._start = this._lastClientXY;\n };\n\n // istanbul ignore next - unable to test touch\n private _onTouchMove = (event: TouchEvent) => {\n if (1 !== event.targetTouches.length) return;\n const mousePos = Vector2d.create(\n event.targetTouches[0].clientX,\n event.targetTouches[0].clientY\n );\n this._processDrag(mousePos);\n };\n\n // istanbul ignore next - unable to test touch\n private _onTouchEnd = (event: TouchEvent) => {\n if (0 !== event.targetTouches.length) return;\n\n if (this.state.dragging) {\n this.setState({ dragging: false });\n ViewportComponentEvents.setCubeMatrix(\n this.state.endRotMatrix,\n CubeNavigationAid._getMatrixFace(this.state.endRotMatrix),\n true\n );\n }\n\n window.removeEventListener(\"touchmove\", this._onTouchMove);\n window.removeEventListener(\"touchend\", this._onTouchEnd);\n };\n\n private _handleFaceCellClick = (pos: Vector3d, face: Face) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n const { endRotMatrix } = this.state;\n let rotMatrix = Matrix3d.createRigidViewAxesZTowardsEye(\n pos.x,\n pos.y,\n pos.z\n ).inverse();\n // istanbul ignore else\n if (rotMatrix) {\n // if isMatrixFace and user is clicking on top/bottom, the current matrix face must be top or bottom\n if (\n !CubeNavigationAid._isMatrixFace(endRotMatrix) &&\n (face === Face.Top || face === Face.Bottom)\n ) {\n const angleAxis = endRotMatrix.getAxisAndAngleOfRotation();\n // istanbul ignore else\n if (angleAxis.ok) {\n const xAx = endRotMatrix.columnX();\n const a = Math.atan2(xAx.y, xAx.x);\n const r = (Math.round((a * 2) / Math.PI) * Math.PI) / 2; // round to quarter turn intervals\n const rot = Matrix3d.createRotationAroundAxisIndex(\n AxisIndex.Z,\n Angle.createRadians(r)\n );\n rotMatrix = rot.multiplyMatrixMatrix(rotMatrix);\n }\n }\n this._animateRotation(rotMatrix, face);\n }\n window.removeEventListener(\"mousemove\", this._onMouseMove);\n };\n\n private _animateRotation = (endRotMatrix: Matrix3d, face: Face) => {\n if (this.state.endRotMatrix.isAlmostEqual(endRotMatrix)) return;\n // set animation variables, let css transitions animate it.\n this._animationFrame = setTimeout(this._animation, 16.667);\n this.setState((prevState) => ({\n startRotMatrix: prevState.endRotMatrix,\n endRotMatrix,\n animation: 0,\n face,\n }));\n };\n\n private _setRotation = (endRotMatrix: Matrix3d, face: Face) => {\n ViewportComponentEvents.setCubeMatrix(endRotMatrix, face);\n // set variables, with animTime at 0 to prevent animation.\n this.setState({\n startRotMatrix: endRotMatrix,\n endRotMatrix,\n animation: 1,\n face,\n });\n };\n}\n\n/** @internal */\nexport interface NavCubeFaceProps\n extends React.AllHTMLAttributes<HTMLDivElement> {\n face: Face;\n label: string;\n hoverMap: { [key: string]: CubeHover };\n onFaceCellClick: (vector: Vector3d, face: Face) => void;\n onFaceCellHoverChange: (vector: Vector3d, state: CubeHover) => void;\n}\n\n/** @internal */\nexport class NavCubeFace extends React.Component<NavCubeFaceProps> {\n private includeCell(vector: Vector3d): boolean {\n const { x, y, z } = vector;\n const omittedCell =\n (y === 0 && x !== 0 && z !== 0) ||\n (y !== 0 && x === 0 && z !== 0) ||\n (y !== 0 && x !== 0 && z === 0);\n return !omittedCell;\n }\n public override render(): React.ReactNode {\n const { face, hoverMap, onFaceCellClick, onFaceCellHoverChange, label } =\n this.props;\n return (\n <div className=\"nav-cube-face\" data-testid=\"nav-cube-face\">\n {[-1, 0, 1].map((y: number) => {\n return (\n <FaceRow key={y} center={y === 0}>\n {[-1, 0, 1].map((x: number) => {\n const vector = NavCubeFace.faceCellToPos(face, x, y);\n if (this.includeCell(vector)) {\n // return a fully functional cell\n return (\n <FaceCell\n key={x}\n onFaceCellHoverChange={onFaceCellHoverChange}\n onFaceCellClick={onFaceCellClick}\n hoverMap={hoverMap}\n vector={vector}\n face={face}\n center={x === 0}\n >\n {x === 0 && y === 0 && label}\n </FaceCell>\n );\n } else {\n // return a placeholder cell\n return (\n <FaceCell\n key={x}\n vector={vector}\n face={face}\n center={x === 0}\n />\n );\n }\n })}\n </FaceRow>\n );\n })}\n </div>\n );\n }\n public static faceCellToPos = (face: Face, x: number, y: number) => {\n const faceVect = cubeNavigationFaceLocs[face];\n const route = cubeNavigationRoutes[face];\n\n const faceX = x < 0 ? route.left : x > 0 ? route.right : Face.None;\n const xVect =\n faceX !== Face.None\n ? cubeNavigationFaceLocs[faceX]\n : Vector3d.createZero();\n\n const faceY = y < 0 ? route.up : y > 0 ? route.down : Face.None;\n const yVect =\n faceY !== Face.None\n ? cubeNavigationFaceLocs[faceY]\n : Vector3d.createZero();\n\n return faceVect.plus(xVect).plus(yVect);\n };\n}\n\ninterface FaceRowProps extends React.AllHTMLAttributes<HTMLDivElement> {\n center?: boolean;\n}\n\nclass FaceRow extends React.Component<FaceRowProps> {\n public override render(): React.ReactNode {\n const { center, children, ...props } = this.props;\n const classNames = classnames(\"face-row\", center && \"cube-center\");\n return (\n <div className={classNames} {...props}>\n {children}\n </div>\n );\n }\n}\n\n/** @internal */\nexport interface FaceCellProps extends React.AllHTMLAttributes<HTMLDivElement> {\n center?: boolean;\n onFaceCellClick?: (vector: Vector3d, face: Face) => void;\n onFaceCellHoverChange?: (vector: Vector3d, state: CubeHover) => void;\n hoverMap?: { [key: string]: CubeHover };\n vector: Vector3d;\n face: Face;\n}\n\n/** @internal */\nexport class FaceCell extends React.Component<FaceCellProps> {\n private _startMouse: Point2d | undefined;\n public override render(): React.ReactNode {\n const {\n center,\n children,\n onFaceCellClick,\n onFaceCellHoverChange,\n hoverMap,\n face,\n vector,\n ...props\n } = this.props;\n const { x, y, z } = vector;\n const n = `${x}-${y}-${z}`;\n const hover = hoverMap && hoverMap[n] === CubeHover.Hover;\n const active = hoverMap && hoverMap[n] === CubeHover.Active;\n const classNames = classnames(\n \"face-cell\",\n center && \"cube-center\",\n hover && \"cube-hover\",\n active && \"cube-active\"\n );\n\n return (\n <div\n onMouseDown={this._handleMouseDown}\n onMouseUp={this._handleMouseUp}\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\n onMouseOver={this._handleMouseOver}\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\n onMouseOut={this._handleMouseOut}\n onTouchStart={this._handleTouchStart}\n onTouchEnd={this._handleTouchEnd}\n data-testid={`nav-cube-face-cell-${face}-${n}`}\n className={classNames}\n role=\"presentation\"\n {...props}\n >\n {children}\n </div>\n );\n }\n private _handleMouseOver = () => {\n const { vector } = this.props;\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.Hover);\n };\n private _handleMouseOut = () => {\n const { vector } = this.props;\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.None);\n };\n private _handleMouseDown = (event: React.MouseEvent) => {\n const { clientX, clientY } = event;\n this.handlePointerDown(clientX, clientY);\n };\n private _handleMouseUp = (event: React.MouseEvent) => {\n const { clientX, clientY } = event;\n this.handlePointerUp(clientX, clientY);\n };\n\n private _handleTouchStart = (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.targetTouches.length === 1 &&\n this.handlePointerDown(\n event.targetTouches[0].clientX,\n event.targetTouches[0].clientY\n );\n };\n\n private _handleTouchEnd = (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.changedTouches.length === 1 &&\n this.handlePointerUp(\n event.changedTouches[0].clientX,\n event.changedTouches[0].clientY\n );\n };\n\n private handlePointerDown(x: number, y: number) {\n const { vector } = this.props;\n this._startMouse = Point2d.create(x, y);\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.Active);\n }\n\n private handlePointerUp(x: number, y: number) {\n const { vector, face } = this.props;\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.None);\n const mouse = Point2d.create(x, y);\n if (this._startMouse && this._startMouse.isAlmostEqual(mouse)) {\n const isFace =\n Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z) === 1;\n this.props.onFaceCellClick &&\n this.props.onFaceCellClick(vector, isFace ? face : Face.None);\n }\n }\n}\n\nenum Pointer {\n None = 0,\n Up,\n Down,\n Left,\n Right,\n}\n\nconst pointerIconSpec: { [key: number]: IconSpec } = {\n [Pointer.Up]: <SvgCaretDown />,\n [Pointer.Down]: <SvgCaretUp />,\n [Pointer.Left]: <SvgCaretRight />,\n [Pointer.Right]: <SvgCaretLeft />,\n};\n\nconst pointerClass: { [key: number]: string } = {\n [Pointer.Up]: \"cube-up\",\n [Pointer.Down]: \"cube-down\",\n [Pointer.Left]: \"cube-left\",\n [Pointer.Right]: \"cube-right\",\n};\n\ninterface PointerProps extends React.AllHTMLAttributes<HTMLDivElement> {\n visible: boolean;\n pointerType: Pointer;\n onArrowClick(pointer: Pointer): void;\n title: string;\n [\"data-testid\"]?: string;\n}\n\nclass PointerButton extends React.Component<PointerProps> {\n public override render(): React.ReactNode {\n const { visible, pointerType, onArrowClick, title, ...props } = this.props;\n const classes = classnames(\n \"cube-pointer\",\n \"icon\",\n pointerClass[pointerType],\n visible && \"cube-visible\"\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n className={classes}\n role=\"button\"\n tabIndex={-1}\n title={title}\n {...props}\n onClick={this._handleClick}\n >\n <Icon iconSpec={pointerIconSpec[pointerType]} />{\" \"}\n </div>\n );\n }\n private _handleClick = (event: React.MouseEvent) => {\n const { pointerType } = this.props;\n event.preventDefault();\n this.props.onArrowClick(pointerType);\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CubeNavigationAid.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/navigationaids/CubeNavigationAid.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oCAAkC;AAClC,4DAAoC;AACpC,6CAA+B;AAE/B,wDAS8B;AAE9B,wDAAiD;AAEjD,kDAAyC;AACzC,8DAA2D;AAE3D,iFAA8E;AAC9E,iCAAoC;AACpC,oEAKoC;AAEpC,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,mEAAS,CAAA;IACT,kEAAS,CAAA;AACX,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,iEAAQ,CAAA;IACR,oEAAU,CAAA;AACZ,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,+DAAO,CAAA;IACP,sEAAW,CAAA;AACb,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AASD,MAAM,sBAAsB,GAAgC;IAC1D,CAAC,WAAI,CAAC,IAAI,CAAC,EAAE,wBAAQ,CAAC,MAAM,CAC1B,qBAAqB,CAAC,IAAI,EAC1B,qBAAqB,CAAC,IAAI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,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IACJ,CAAC;IA5BiB,MAAM;QACpB,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3E,MAAM,OAAO,GAAG,IAAA,oBAAU,EACxB,cAAc,EACd,MAAM,EACN,YAAY,CAAC,WAAW,CAAC,EACzB,OAAO,IAAI,cAAc,CAC1B,CAAC;QAEF,OAAO;QACL,iEAAiE;QACjE,6BACE,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAE,KAAK,KACR,KAAK,EACT,OAAO,EAAE,IAAI,CAAC,YAAY;YAE1B,oBAAC,iBAAI,IAAC,QAAQ,EAAE,eAAe,CAAC,WAAW,CAAC,GAAI;YAAC,GAAG,CAChD,CACP,CAAC;IACJ,CAAC;CAMF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NavigationAids\n */\n\nimport \"./CubeNavigationAid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { XYAndZ } from \"@itwin/core-geometry\";\nimport {\n Angle,\n AxisIndex,\n AxisOrder,\n Geometry,\n Matrix3d,\n Point2d,\n Vector2d,\n Vector3d,\n} from \"@itwin/core-geometry\";\nimport type { IModelConnection, Viewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { CommonProps, IconSpec } from \"@itwin/core-react\";\nimport { Icon } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport type { ViewRotationChangeEventArgs } from \"../viewport/ViewportComponentEvents\";\nimport { ViewportComponentEvents } from \"../viewport/ViewportComponentEvents\";\nimport { Cube, Face } from \"./Cube\";\nimport {\n SvgCaretDown,\n SvgCaretLeft,\n SvgCaretRight,\n SvgCaretUp,\n} from \"@itwin/itwinui-icons-react\";\n\n/** @public */\nexport enum CubeNavigationHitBoxX {\n None = 0,\n Right = 1,\n Left = -1,\n}\n\n/** @public */\nexport enum CubeNavigationHitBoxY {\n None = 0,\n Back = 1,\n Front = -1,\n}\n\n/** @public */\nexport enum CubeNavigationHitBoxZ {\n None = 0,\n Top = 1,\n Bottom = -1,\n}\n\ninterface CubeNavigationRotationMap {\n up: Face;\n down: Face;\n left: Face;\n right: Face;\n}\n\nconst cubeNavigationFaceLocs: { [key: string]: Vector3d } = {\n [Face.Left]: Vector3d.create(\n CubeNavigationHitBoxX.Left,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Right]: Vector3d.create(\n CubeNavigationHitBoxX.Right,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Back]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.Back,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Front]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.Front,\n CubeNavigationHitBoxZ.None\n ),\n [Face.Bottom]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.Bottom\n ),\n [Face.Top]: Vector3d.create(\n CubeNavigationHitBoxX.None,\n CubeNavigationHitBoxY.None,\n CubeNavigationHitBoxZ.Top\n ),\n};\n\nconst cubeNavigationFaceRotations: { [key: string]: Matrix3d } = {\n [Face.Left]: Matrix3d.createRowValues(0, -1, 0, 0, 0, 1, -1, 0, 0),\n [Face.Right]: Matrix3d.createRowValues(0, 1, 0, 0, 0, 1, 1, 0, 0),\n [Face.Back]: Matrix3d.createRowValues(-1, 0, 0, 0, 0, 1, 0, 1, 0),\n [Face.Front]: Matrix3d.createRowValues(1, 0, 0, 0, 0, 1, 0, -1, 0),\n [Face.Bottom]: Matrix3d.createRowValues(1, 0, 0, 0, -1, 0, 0, 0, -1),\n [Face.Top]: Matrix3d.createRowValues(1, 0, 0, 0, 1, 0, 0, 0, 1),\n};\n\n// data relating Up/Down/Left/Right directions relative to every surface\nconst cubeNavigationRoutes: { [key: string]: CubeNavigationRotationMap } = {\n [Face.Front]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Left,\n right: Face.Right,\n },\n [Face.Back]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Right,\n right: Face.Left,\n },\n [Face.Top]: {\n up: Face.Back,\n down: Face.Front,\n left: Face.Left,\n right: Face.Right,\n },\n [Face.Bottom]: {\n up: Face.Front,\n down: Face.Back,\n left: Face.Left,\n right: Face.Right,\n },\n [Face.Right]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Front,\n right: Face.Back,\n },\n [Face.Left]: {\n up: Face.Top,\n down: Face.Bottom,\n left: Face.Back,\n right: Face.Front,\n },\n};\n\n/** The default tolerance (1.0e-6) is appropriate if very dirty viewing operations are expected. */\nconst DEFAULT_TOLERANCE = 1.0e-6;\n\n/** @internal */\nexport enum CubeHover {\n None = 0,\n Hover,\n Active,\n}\n\n/** Properties for the [[CubeNavigationAid]] component\n * @public\n */\nexport interface CubeNavigationAidProps extends CommonProps {\n iModelConnection: IModelConnection;\n viewport?: Viewport;\n\n // used only in testing\n\n /** @internal */\n onAnimationEnd?: () => void;\n /** @internal */\n animationTime?: number;\n favorHeadsUpRotation?: boolean;\n}\n\n/** @public */\ninterface CubeNavigationAidState {\n dragging: boolean;\n startRotMatrix: Matrix3d;\n endRotMatrix: Matrix3d;\n animation: number;\n hoverMap: { [key: string]: CubeHover };\n face: Face;\n}\n\n/** Cube Navigation Aid Component\n * @public\n */\nexport class CubeNavigationAid extends React.Component<\n CubeNavigationAidProps,\n CubeNavigationAidState\n> {\n private _start: Vector2d = Vector2d.createZero();\n /** @internal */\n public override readonly state: Readonly<CubeNavigationAidState> = {\n dragging: false,\n startRotMatrix: Matrix3d.createIdentity(),\n endRotMatrix: Matrix3d.createIdentity(),\n animation: 1,\n hoverMap: {},\n face: Face.Top,\n };\n\n private _lastTime: number | undefined;\n private _animationFrame: any;\n private _mounted: boolean = false;\n private _labels: { [key: string]: string } = {\n [Face.Right]: UiIModelComponents.translate(\"cube.right\"),\n [Face.Left]: UiIModelComponents.translate(\"cube.left\"),\n [Face.Back]: UiIModelComponents.translate(\"cube.back\"),\n [Face.Front]: UiIModelComponents.translate(\"cube.front\"),\n [Face.Top]: UiIModelComponents.translate(\"cube.top\"),\n [Face.Bottom]: UiIModelComponents.translate(\"cube.bottom\"),\n };\n\n /** @internal */\n public override componentDidMount() {\n this._mounted = true;\n ViewportComponentEvents.onViewRotationChangeEvent.addListener(\n this._handleViewRotationChangeEvent\n );\n\n // set initial rotation\n if (this.props.viewport) {\n const newMatrix = this.props.viewport.view.getRotation().clone();\n this.setState({\n startRotMatrix: newMatrix,\n endRotMatrix: newMatrix,\n animation: 1,\n });\n }\n }\n\n /** @internal */\n public override componentWillUnmount() {\n ViewportComponentEvents.onViewRotationChangeEvent.removeListener(\n this._handleViewRotationChangeEvent\n );\n clearTimeout(this._animationFrame);\n this._mounted = false;\n }\n\n // Synchronize with rotation coming from the Viewport\n private _handleViewRotationChangeEvent = (\n args: ViewRotationChangeEventArgs // eslint-disable-line deprecation/deprecation\n ) => {\n const { animation, dragging, endRotMatrix } = this.state;\n if (this.props.viewport === args.viewport && animation >= 1 && !dragging) {\n const newMatrix = this.props.viewport.view.getRotation().clone();\n if (!endRotMatrix.isAlmostEqual(newMatrix)) {\n this.setState({\n startRotMatrix: newMatrix,\n endRotMatrix: newMatrix,\n animation: 1,\n face: Face.None,\n });\n }\n }\n };\n\n private _animation = () => {\n const t = Date.now();\n const delta = this._lastTime ? t - this._lastTime : 16;\n this._lastTime = t;\n if (this.state.animation !== 1) {\n const animation = Math.min(\n 1,\n this.state.animation +\n delta / (1000 * (this.props.animationTime || 0.4))\n );\n\n if (this._mounted) {\n this.setState({ animation }, () => {\n this._animationFrame = setTimeout(this._animation, 16.667);\n });\n }\n } else {\n this._lastTime = undefined;\n this._animationEnd();\n }\n };\n\n private _animationEnd = () => {\n ViewportComponentEvents.setCubeMatrix(\n this.state.endRotMatrix,\n this.state.face,\n true\n );\n const startRotMatrix = this.state.endRotMatrix.clone();\n if (this._mounted) {\n this.setState({ startRotMatrix }, () => {\n if (this.props.onAnimationEnd) this.props.onAnimationEnd();\n });\n }\n };\n\n private static _animationFn = (t: number) =>\n t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;\n\n private static _isMatrixFace = (matrix: Matrix3d): boolean => {\n let sum = 0;\n for (const coff of matrix.coffs) {\n if (Geometry.isAlmostEqualNumber(Math.abs(coff), 1)) sum++;\n }\n // Assuming matrix is a proper rotation matrix:\n // if matrix viewing a face, there will be a total of 3 values either almost -1, or almost 1.\n return sum === 3;\n };\n\n public override render(): React.ReactNode {\n const { animation, startRotMatrix, endRotMatrix } = this.state;\n const visible =\n CubeNavigationAid._isMatrixFace(endRotMatrix) && animation === 1.0;\n const rotMatrix = CubeNavigationAid._interpolateRotMatrix(\n startRotMatrix,\n animation,\n endRotMatrix\n );\n if (rotMatrix !== startRotMatrix && rotMatrix !== endRotMatrix)\n ViewportComponentEvents.setCubeMatrix(rotMatrix, Face.None);\n\n const faces: { [key: string]: React.ReactNode } = {};\n for (const key in this._labels) {\n if (this._labels.hasOwnProperty(key)) {\n const f = key as Face;\n const label = this._labels[f];\n faces[f] = (\n <NavCubeFace\n face={f}\n label={label}\n hoverMap={this.state.hoverMap}\n onFaceCellClick={this._handleFaceCellClick}\n onFaceCellHoverChange={this._handleCellHoverChange}\n />\n );\n }\n }\n\n const cubeClassNames = classnames(\n \"nav-cube\",\n this.state.dragging && \"cube-dragging\"\n );\n\n const upTitle = this.getArrowTitle(Pointer.Up);\n const downTitle = this.getArrowTitle(Pointer.Down);\n const leftTitle = this.getArrowTitle(Pointer.Left);\n const rightTitle = this.getArrowTitle(Pointer.Right);\n\n return (\n <div\n className={classnames(\n \"components-cube-container\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"components-cube-navigation-aid\"\n onMouseDown={this._handleBoxMouseDown}\n onTouchStart={this._handleBoxTouchStart}\n role=\"presentation\"\n >\n <div className={\"cube-element-container\"}>\n <Cube\n className={cubeClassNames}\n rotMatrix={rotMatrix}\n faces={faces}\n />\n </div>\n <PointerButton\n data-testid=\"cube-pointer-button-up\"\n visible={visible}\n pointerType={Pointer.Up}\n onArrowClick={this._onArrowClick}\n title={upTitle}\n />\n <PointerButton\n data-testid=\"cube-pointer-button-down\"\n visible={visible}\n pointerType={Pointer.Down}\n onArrowClick={this._onArrowClick}\n title={downTitle}\n />\n <PointerButton\n data-testid=\"cube-pointer-button-left\"\n visible={visible}\n pointerType={Pointer.Left}\n onArrowClick={this._onArrowClick}\n title={leftTitle}\n />\n <PointerButton\n data-testid=\"cube-pointer-button-right\"\n visible={visible}\n pointerType={Pointer.Right}\n onArrowClick={this._onArrowClick}\n title={rightTitle}\n />\n </div>\n );\n }\n\n private _handleCellHoverChange = (vect: Vector3d, state: CubeHover) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n const hoverMap = this.state.hoverMap;\n hoverMap[`${vect.x}-${vect.y}-${vect.z}`] = state;\n this.setState({ hoverMap });\n };\n\n private _isInteractionLocked = () => {\n // Locked by markup\n if (\n undefined !== this.props.viewport &&\n this.props.viewport === IModelApp.toolAdmin.markupView\n ) {\n return true;\n }\n return false;\n };\n\n private static _getMatrixFace = (rotMatrix: Matrix3d): Face => {\n if (!CubeNavigationAid._isMatrixFace(rotMatrix)) {\n return Face.None;\n }\n\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Top].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Top].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Top].coffs[8]\n )\n return Face.Top;\n\n if (\n rotMatrix.coffs[6] ===\n cubeNavigationFaceRotations[Face.Bottom].coffs[6] &&\n rotMatrix.coffs[7] ===\n cubeNavigationFaceRotations[Face.Bottom].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Bottom].coffs[8]\n )\n return Face.Bottom;\n\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Left].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Left].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Left].coffs[8]\n )\n return Face.Left;\n\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Right].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Right].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Right].coffs[8]\n )\n return Face.Right;\n\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Back].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Back].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Back].coffs[8]\n )\n return Face.Back;\n\n if (\n rotMatrix.coffs[6] === cubeNavigationFaceRotations[Face.Front].coffs[6] &&\n rotMatrix.coffs[7] === cubeNavigationFaceRotations[Face.Front].coffs[7] &&\n rotMatrix.coffs[8] === cubeNavigationFaceRotations[Face.Front].coffs[8]\n )\n return Face.Front;\n\n return Face.None;\n };\n\n private static _interpolateRotMatrix = (\n start: Matrix3d,\n anim: number,\n end: Matrix3d\n ): Matrix3d => {\n if (anim === 0) return start;\n if (anim === 1 || start.isAlmostEqual(end)) return end;\n const startInverse = start.transpose();\n const diff = end.multiplyMatrixMatrix(startInverse);\n const angleAxis = diff.getAxisAndAngleOfRotation();\n if (angleAxis.ok) {\n const angle = Angle.createRadians(\n angleAxis.angle.radians * CubeNavigationAid._animationFn(anim)\n );\n const newDiff = Matrix3d.createRotationAroundVector(\n angleAxis.axis,\n angle\n );\n if (newDiff) {\n const newMatrix = newDiff.multiplyMatrixMatrix(start);\n return newMatrix;\n }\n }\n return end;\n };\n\n private static correctSmallNumber(value: number, tolerance: number): number {\n return Math.abs(value) < tolerance ? 0 : value;\n }\n\n /**\n * Snap coordinates of a vector to zero and to each other so that the vector prefers to be\n * * perpendicular to a face of the unit cube.\n * * or pass through a nearby vertex or edge of the unit cube.\n * @param zVector existing z vector.\n * @param tolerance tolerance to determine if a z vector component is close to zero or 1.\n */\n private static snapVectorToCubeFeatures(\n zVector: XYAndZ,\n tolerance: number\n ): Vector3d {\n const x = CubeNavigationAid.correctSmallNumber(zVector.x, tolerance);\n let y = CubeNavigationAid.correctSmallNumber(zVector.y, tolerance);\n let z = CubeNavigationAid.correctSmallNumber(zVector.z, tolerance);\n\n const xx = x === -0 ? Math.abs(x) : x;\n const yy = y === -0 ? Math.abs(y) : y;\n const zz = z === -0 ? Math.abs(z) : z;\n\n // adjust any adjacent pair of near equal values to the first.\n if (Geometry.isSameCoordinate(xx, yy, tolerance)) {\n y = Geometry.split3WaySign(y, -xx, xx, xx);\n }\n if (Geometry.isSameCoordinate(yy, zz, tolerance)) {\n z = Geometry.split3WaySign(z, -yy, yy, yy);\n }\n if (Geometry.isSameCoordinate(xx, zz, tolerance)) {\n z = Geometry.split3WaySign(z, -xx, xx, xx);\n }\n return Vector3d.create(x, y, z);\n }\n\n /**\n * Adjust a worldToView matrix to favor both\n * * direct view at faces, edges, and corners of a view cube.\n * * heads up\n * @param worldToView candidate matrix\n * @param tolerance tolerance for cleaning up fuzz. The default (1.0e-6) is appropriate if very dirty viewing operations are expected.\n * @param result optional result.\n */\n private static snapWorldToViewMatrixToCubeFeatures(\n worldToView: Matrix3d,\n tolerance: number,\n result?: Matrix3d,\n favorHeadsUpRotation?: boolean\n ): Matrix3d {\n const oldZ = worldToView.rowZ();\n const newZ = CubeNavigationAid.snapVectorToCubeFeatures(oldZ, tolerance);\n const headsUp = !!favorHeadsUpRotation;\n // If newZ is true up or down, it will have true 0 for x and y.\n // special case this to take x direction from the input.\n // This methodology results in always \"righting\" the face when rotation from an upside-down cube.\n // The behavior was made opt-in in response to https://github.com/iTwin/appui/issues/259\n if (!headsUp || (newZ.x === 0.0 && newZ.y === 0)) {\n const perpVector = worldToView.rowX();\n result = Matrix3d.createRigidFromColumns(\n newZ,\n perpVector,\n AxisOrder.ZXY,\n result\n )!;\n } else {\n result = Matrix3d.createRigidViewAxesZTowardsEye(\n newZ.x,\n newZ.y,\n newZ.z,\n result\n );\n }\n if (result) result.transposeInPlace();\n return result;\n }\n\n private getArrowRotationAndFace(arrow: Pointer): {\n newRotation: Matrix3d;\n face: Face;\n } {\n const localRotationAxis = Vector3d.create(0, 0, 0);\n switch (arrow) {\n case Pointer.Up:\n localRotationAxis.x = -1.0;\n break;\n case Pointer.Down:\n localRotationAxis.x = 1.0;\n break;\n case Pointer.Left:\n localRotationAxis.y = -1.0;\n break;\n default:\n localRotationAxis.y = 1.0;\n break;\n }\n const localRotation = Matrix3d.createRotationAroundVector(\n localRotationAxis,\n Angle.createDegrees(-90)\n )!;\n const newRotation = localRotation.multiplyMatrixMatrix(\n this.state.endRotMatrix\n );\n CubeNavigationAid.snapWorldToViewMatrixToCubeFeatures(\n newRotation,\n DEFAULT_TOLERANCE,\n newRotation,\n this.props.favorHeadsUpRotation\n );\n const face = CubeNavigationAid._getMatrixFace(newRotation);\n return { newRotation, face };\n }\n\n private _onArrowClick = (arrow: Pointer) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n const { newRotation, face } = this.getArrowRotationAndFace(arrow);\n this._animateRotation(newRotation, face);\n };\n\n private getArrowTitle(arrow: Pointer) {\n const { face } = this.getArrowRotationAndFace(arrow);\n return this._labels[face];\n }\n\n private _lastClientXY: Vector2d = Vector2d.createZero();\n private _processDrag(mousePos: Vector2d) {\n if (!this._start.isAlmostEqual(mousePos)) {\n const movement = mousePos.minus(this._lastClientXY);\n const diff = movement.scale(0.05);\n\n const yaw = Angle.createRadians(diff.x);\n const pitch = Angle.createRadians(diff.y);\n\n const matX = Matrix3d.createRotationAroundAxisIndex(AxisIndex.X, pitch);\n const matZ = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, yaw);\n\n const mat = matX\n .multiplyMatrixMatrix(this.state.startRotMatrix)\n .multiplyMatrixMatrix(matZ);\n this._setRotation(mat, CubeNavigationAid._getMatrixFace(mat));\n if (!this.state.dragging) this.setState({ dragging: true });\n }\n this._lastClientXY = mousePos;\n }\n\n private _handleBoxMouseDown = (event: any) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n event.preventDefault();\n // only start listening after drag is confirmed. Ie. the 3D box is clicked.\n window.addEventListener(\"mousemove\", this._onMouseMove, false);\n window.addEventListener(\"mouseup\", this._onMouseUp, false);\n this._lastClientXY = Vector2d.create(event.clientX, event.clientY);\n this._start = this._lastClientXY;\n };\n\n private _onMouseMove = (event: MouseEvent) => {\n const mousePos = Vector2d.create(event.clientX, event.clientY);\n this._processDrag(mousePos);\n };\n\n private _onMouseUp = () => {\n if (this.state.dragging) {\n this.setState({ dragging: false });\n ViewportComponentEvents.setCubeMatrix(\n this.state.endRotMatrix,\n CubeNavigationAid._getMatrixFace(this.state.endRotMatrix),\n true\n );\n }\n\n // remove so event only triggers after this.onMouseStartDrag\n window.removeEventListener(\"mousemove\", this._onMouseMove);\n window.removeEventListener(\"mouseup\", this._onMouseUp);\n };\n\n private _handleBoxTouchStart = (event: any) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n if (1 !== event.targetTouches.length) return;\n window.addEventListener(\"touchmove\", this._onTouchMove, false);\n window.addEventListener(\"touchend\", this._onTouchEnd, false);\n this._lastClientXY = Vector2d.create(\n event.targetTouches[0].clientX,\n event.targetTouches[0].clientY\n );\n this._start = this._lastClientXY;\n };\n\n private _onTouchMove = (event: TouchEvent) => {\n if (1 !== event.targetTouches.length) return;\n const mousePos = Vector2d.create(\n event.targetTouches[0].clientX,\n event.targetTouches[0].clientY\n );\n this._processDrag(mousePos);\n };\n\n private _onTouchEnd = (event: TouchEvent) => {\n if (0 !== event.targetTouches.length) return;\n\n if (this.state.dragging) {\n this.setState({ dragging: false });\n ViewportComponentEvents.setCubeMatrix(\n this.state.endRotMatrix,\n CubeNavigationAid._getMatrixFace(this.state.endRotMatrix),\n true\n );\n }\n\n window.removeEventListener(\"touchmove\", this._onTouchMove);\n window.removeEventListener(\"touchend\", this._onTouchEnd);\n };\n\n private _handleFaceCellClick = (pos: Vector3d, face: Face) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n const { endRotMatrix } = this.state;\n let rotMatrix = Matrix3d.createRigidViewAxesZTowardsEye(\n pos.x,\n pos.y,\n pos.z\n ).inverse();\n if (rotMatrix) {\n // if isMatrixFace and user is clicking on top/bottom, the current matrix face must be top or bottom\n if (\n !CubeNavigationAid._isMatrixFace(endRotMatrix) &&\n (face === Face.Top || face === Face.Bottom)\n ) {\n const angleAxis = endRotMatrix.getAxisAndAngleOfRotation();\n if (angleAxis.ok) {\n const xAx = endRotMatrix.columnX();\n const a = Math.atan2(xAx.y, xAx.x);\n const r = (Math.round((a * 2) / Math.PI) * Math.PI) / 2; // round to quarter turn intervals\n const rot = Matrix3d.createRotationAroundAxisIndex(\n AxisIndex.Z,\n Angle.createRadians(r)\n );\n rotMatrix = rot.multiplyMatrixMatrix(rotMatrix);\n }\n }\n this._animateRotation(rotMatrix, face);\n }\n window.removeEventListener(\"mousemove\", this._onMouseMove);\n };\n\n private _animateRotation = (endRotMatrix: Matrix3d, face: Face) => {\n if (this.state.endRotMatrix.isAlmostEqual(endRotMatrix)) return;\n // set animation variables, let css transitions animate it.\n this._animationFrame = setTimeout(this._animation, 16.667);\n this.setState((prevState) => ({\n startRotMatrix: prevState.endRotMatrix,\n endRotMatrix,\n animation: 0,\n face,\n }));\n };\n\n private _setRotation = (endRotMatrix: Matrix3d, face: Face) => {\n ViewportComponentEvents.setCubeMatrix(endRotMatrix, face);\n // set variables, with animTime at 0 to prevent animation.\n this.setState({\n startRotMatrix: endRotMatrix,\n endRotMatrix,\n animation: 1,\n face,\n });\n };\n}\n\n/** @internal */\nexport interface NavCubeFaceProps\n extends React.AllHTMLAttributes<HTMLDivElement> {\n face: Face;\n label: string;\n hoverMap: { [key: string]: CubeHover };\n onFaceCellClick: (vector: Vector3d, face: Face) => void;\n onFaceCellHoverChange: (vector: Vector3d, state: CubeHover) => void;\n}\n\n/** @internal */\nexport class NavCubeFace extends React.Component<NavCubeFaceProps> {\n private includeCell(vector: Vector3d): boolean {\n const { x, y, z } = vector;\n const omittedCell =\n (y === 0 && x !== 0 && z !== 0) ||\n (y !== 0 && x === 0 && z !== 0) ||\n (y !== 0 && x !== 0 && z === 0);\n return !omittedCell;\n }\n public override render(): React.ReactNode {\n const { face, hoverMap, onFaceCellClick, onFaceCellHoverChange, label } =\n this.props;\n return (\n <div className=\"nav-cube-face\" data-testid=\"nav-cube-face\">\n {[-1, 0, 1].map((y: number) => {\n return (\n <FaceRow key={y} center={y === 0}>\n {[-1, 0, 1].map((x: number) => {\n const vector = NavCubeFace.faceCellToPos(face, x, y);\n if (this.includeCell(vector)) {\n // return a fully functional cell\n return (\n <FaceCell\n key={x}\n onFaceCellHoverChange={onFaceCellHoverChange}\n onFaceCellClick={onFaceCellClick}\n hoverMap={hoverMap}\n vector={vector}\n face={face}\n center={x === 0}\n >\n {x === 0 && y === 0 && label}\n </FaceCell>\n );\n } else {\n // return a placeholder cell\n return (\n <FaceCell\n key={x}\n vector={vector}\n face={face}\n center={x === 0}\n />\n );\n }\n })}\n </FaceRow>\n );\n })}\n </div>\n );\n }\n public static faceCellToPos = (face: Face, x: number, y: number) => {\n const faceVect = cubeNavigationFaceLocs[face];\n const route = cubeNavigationRoutes[face];\n\n const faceX = x < 0 ? route.left : x > 0 ? route.right : Face.None;\n const xVect =\n faceX !== Face.None\n ? cubeNavigationFaceLocs[faceX]\n : Vector3d.createZero();\n\n const faceY = y < 0 ? route.up : y > 0 ? route.down : Face.None;\n const yVect =\n faceY !== Face.None\n ? cubeNavigationFaceLocs[faceY]\n : Vector3d.createZero();\n\n return faceVect.plus(xVect).plus(yVect);\n };\n}\n\ninterface FaceRowProps extends React.AllHTMLAttributes<HTMLDivElement> {\n center?: boolean;\n}\n\nclass FaceRow extends React.Component<FaceRowProps> {\n public override render(): React.ReactNode {\n const { center, children, ...props } = this.props;\n const classNames = classnames(\"face-row\", center && \"cube-center\");\n return (\n <div className={classNames} {...props}>\n {children}\n </div>\n );\n }\n}\n\n/** @internal */\nexport interface FaceCellProps extends React.AllHTMLAttributes<HTMLDivElement> {\n center?: boolean;\n onFaceCellClick?: (vector: Vector3d, face: Face) => void;\n onFaceCellHoverChange?: (vector: Vector3d, state: CubeHover) => void;\n hoverMap?: { [key: string]: CubeHover };\n vector: Vector3d;\n face: Face;\n}\n\n/** @internal */\nexport class FaceCell extends React.Component<FaceCellProps> {\n private _startMouse: Point2d | undefined;\n public override render(): React.ReactNode {\n const {\n center,\n children,\n onFaceCellClick,\n onFaceCellHoverChange,\n hoverMap,\n face,\n vector,\n ...props\n } = this.props;\n const { x, y, z } = vector;\n const n = `${x}-${y}-${z}`;\n const hover = hoverMap && hoverMap[n] === CubeHover.Hover;\n const active = hoverMap && hoverMap[n] === CubeHover.Active;\n const classNames = classnames(\n \"face-cell\",\n center && \"cube-center\",\n hover && \"cube-hover\",\n active && \"cube-active\"\n );\n\n return (\n <div\n onMouseDown={this._handleMouseDown}\n onMouseUp={this._handleMouseUp}\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\n onMouseOver={this._handleMouseOver}\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\n onMouseOut={this._handleMouseOut}\n onTouchStart={this._handleTouchStart}\n onTouchEnd={this._handleTouchEnd}\n data-testid={`nav-cube-face-cell-${face}-${n}`}\n className={classNames}\n role=\"presentation\"\n {...props}\n >\n {children}\n </div>\n );\n }\n private _handleMouseOver = () => {\n const { vector } = this.props;\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.Hover);\n };\n private _handleMouseOut = () => {\n const { vector } = this.props;\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.None);\n };\n private _handleMouseDown = (event: React.MouseEvent) => {\n const { clientX, clientY } = event;\n this.handlePointerDown(clientX, clientY);\n };\n private _handleMouseUp = (event: React.MouseEvent) => {\n const { clientX, clientY } = event;\n this.handlePointerUp(clientX, clientY);\n };\n\n private _handleTouchStart = (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.targetTouches.length === 1 &&\n this.handlePointerDown(\n event.targetTouches[0].clientX,\n event.targetTouches[0].clientY\n );\n };\n\n private _handleTouchEnd = (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.changedTouches.length === 1 &&\n this.handlePointerUp(\n event.changedTouches[0].clientX,\n event.changedTouches[0].clientY\n );\n };\n\n private handlePointerDown(x: number, y: number) {\n const { vector } = this.props;\n this._startMouse = Point2d.create(x, y);\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.Active);\n }\n\n private handlePointerUp(x: number, y: number) {\n const { vector, face } = this.props;\n this.props.onFaceCellHoverChange &&\n this.props.onFaceCellHoverChange(vector, CubeHover.None);\n const mouse = Point2d.create(x, y);\n if (this._startMouse && this._startMouse.isAlmostEqual(mouse)) {\n const isFace =\n Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z) === 1;\n this.props.onFaceCellClick &&\n this.props.onFaceCellClick(vector, isFace ? face : Face.None);\n }\n }\n}\n\nenum Pointer {\n None = 0,\n Up,\n Down,\n Left,\n Right,\n}\n\nconst pointerIconSpec: { [key: number]: IconSpec } = {\n [Pointer.Up]: <SvgCaretDown />,\n [Pointer.Down]: <SvgCaretUp />,\n [Pointer.Left]: <SvgCaretRight />,\n [Pointer.Right]: <SvgCaretLeft />,\n};\n\nconst pointerClass: { [key: number]: string } = {\n [Pointer.Up]: \"cube-up\",\n [Pointer.Down]: \"cube-down\",\n [Pointer.Left]: \"cube-left\",\n [Pointer.Right]: \"cube-right\",\n};\n\ninterface PointerProps extends React.AllHTMLAttributes<HTMLDivElement> {\n visible: boolean;\n pointerType: Pointer;\n onArrowClick(pointer: Pointer): void;\n title: string;\n [\"data-testid\"]?: string;\n}\n\nclass PointerButton extends React.Component<PointerProps> {\n public override render(): React.ReactNode {\n const { visible, pointerType, onArrowClick, title, ...props } = this.props;\n const classes = classnames(\n \"cube-pointer\",\n \"icon\",\n pointerClass[pointerType],\n visible && \"cube-visible\"\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div\n className={classes}\n role=\"button\"\n tabIndex={-1}\n title={title}\n {...props}\n onClick={this._handleClick}\n >\n <Icon iconSpec={pointerIconSpec[pointerType]} />{\" \"}\n </div>\n );\n }\n private _handleClick = (event: React.MouseEvent) => {\n const { pointerType } = this.props;\n event.preventDefault();\n this.props.onArrowClick(pointerType);\n };\n}\n"]}
|
|
@@ -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;AAG/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,EAAa,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAerD;;;GAG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AAC;IAEnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAE5B,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,KAAK,CAAC,SAAS,CACvD,yBAAyB,EACzB,yBAAyB,CAC1B;IACC,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,qBAAqB,CAAqC;IAClE,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,WAAW,CAKhB;IACH,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,QAAQ,CAAkB;IAElC,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,yBAAyB,CAAC,CAAC;gBAExD,KAAK,EAAE,yBAAyB;IAyC5C,gBAAgB;IACA,MAAM,IAAI,KAAK,CAAC,SAAS;IAmNzC,OAAO,CAAC,aAAa,CAEnB;IAEF,OAAO,CAAC,SAAS,CAAqB;IAEtC,OAAO,CAAC,MAAM,CAAC,YAAY,CACmB;IAE9C,OAAO,CAAC,UAAU,
|
|
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;AAG/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,EAAa,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAerD;;;GAGG;AACH,oBAAY,O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