@expofp/renderer 1.4.1 → 1.4.2

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5061,8 +5061,9 @@ class ControlsSystem {
5061
5061
  const { maxZoom, paddingPercent } = opts;
5062
5062
  const dpr = this.renderer.context.getPixelRatio();
5063
5063
  const visibleRect = this.renderer.visibleRect;
5064
+ const bearingAngle = -this.controller.azimuthAngle;
5064
5065
  const worldRect = new Rect(this.viewportSystem.svgToWorld(rect.min), this.viewportSystem.svgToWorld(rect.max));
5065
- const worldPolygon = Polygon.fromRect(worldRect).rotate(-this.controller.azimuthAngle, worldRect.center);
5066
+ const worldPolygon = Polygon.fromRect(worldRect).rotate(bearingAngle, worldRect.center);
5066
5067
  const xValues = worldPolygon.vertices.map((p) => p.x);
5067
5068
  const yValues = worldPolygon.vertices.map((p) => p.y);
5068
5069
  const sourceRect = new Rect(
@@ -5077,7 +5078,7 @@ class ControlsSystem {
5077
5078
  const zoom = maxZoom ? Math.min(minZoom, maxZoom) : minZoom;
5078
5079
  const translate = sourceRect.center;
5079
5080
  if (visibleRect) {
5080
- const offset = new Vector2(...this.renderer.size).multiplyScalar(0.5).sub(targetRect.center).multiplyScalar(1 / zoom).rotateAround({ x: 0, y: 0 }, this.controller.azimuthAngle);
5081
+ const offset = new Vector2(...this.renderer.size).multiplyScalar(0.5).sub(targetRect.center).multiplyScalar(1 / zoom).rotateAround({ x: 0, y: 0 }, bearingAngle);
5081
5082
  translate.add(offset);
5082
5083
  }
5083
5084
  const enableTransition = !immediate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/renderer",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"