Skip to content

Commit 4a38a30

Browse files
committed
Version 5.3.10
1 parent 24671ef commit 4a38a30

6 files changed

Lines changed: 39 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@amcharts/amcharts5",
4-
"version": "5.3.9",
4+
"version": "5.3.10",
55
"author": "amCharts <contact@amcharts.com> (https://www.amcharts.com/)",
66
"description": "amCharts 5",
77
"homepage": "https://www.amcharts.com/",

packages/shared/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
55
Please note, that this project, while following numbering syntax, it DOES NOT
66
adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules.
77

8+
## [5.3.10] - 2023-04-06
9+
10+
### Added
11+
- `homeRotationX` and `homeRotationY` settings added to `MapChart`. Allows setting home x and y rotations. The chart will rotate to provided values when `goHome()` method is called.
12+
13+
### Fixed
14+
- Accessibility: Legend item's ARIA labels will not contain "Press ENTER to toggle" message if the `clickTarget = "none"` is set.
15+
- Further improvements in rendering/sizing of the HTML-based tooltips.
16+
17+
818
## [5.3.9] - 2023-03-31
919

1020
### Added

src/.internal/charts/map/MapChart.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,20 @@ export interface IMapChartSettings extends ISerialChartSettings {
181181
*/
182182
homeZoomLevel?: number;
183183

184+
/**
185+
* Initial/home rotationX.
186+
*
187+
* @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Initial_position_and_zoom} for more info
188+
*/
189+
homeRotationX?: number;
190+
191+
/**
192+
* Initial/home rotationY.
193+
*
194+
* @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Initial_position_and_zoom} for more info
195+
*/
196+
homeRotationY?: number;
197+
184198
/**
185199
* Initial coordinates to center map on load or `goHome()` call.
186200
*
@@ -607,7 +621,7 @@ export class MapChart extends SerialChart {
607621
* @param duration Animation duration in milliseconds
608622
*/
609623
public goHome(duration?: number) {
610-
this.zoomToGeoPoint(this.homeGeoPoint(), this.get("homeZoomLevel", 1), true, duration);
624+
this.zoomToGeoPoint(this.homeGeoPoint(), this.get("homeZoomLevel", 1), true, duration, this.get("homeRotationX"), this.get("homeRotationY"));
611625
}
612626

613627
public _updateChildren() {
@@ -1131,7 +1145,7 @@ export class MapChart extends SerialChart {
11311145
let xy = this.convert(geoPoint, rotationX, rotationY);
11321146

11331147
if (rotationX != null || rotationY != null) {
1134-
this.rotate(rotationX, rotationY);
1148+
this.rotate(rotationX, rotationY, duration);
11351149
}
11361150

11371151
if (xy) {

src/.internal/core/Registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class Registry {
66
/**
77
* Currently running version of amCharts.
88
*/
9-
readonly version: string = "5.3.9";
9+
readonly version: string = "5.3.10";
1010

1111
/**
1212
* List of applied licenses.

src/.internal/core/Root.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ export class Root implements IDisposer {
867867
allParents[key]._updateChildren();
868868
});
869869

870+
870871
const objects: Array<Entity> = [];
871872

872873
// console.log("_beforeChanged")
@@ -905,6 +906,8 @@ export class Root implements IDisposer {
905906
}
906907
});
907908

909+
this._positionHTMLElements();
910+
908911
// High depth -> low depth
909912
bounds.sort((x, y) => {
910913
return $order.compare(depths[y.uid], depths[x.uid]);
@@ -968,7 +971,7 @@ export class Root implements IDisposer {
968971
}
969972
}
970973

971-
public _runTicker(currentTime: number) {
974+
public _runTicker(currentTime: number, now?: boolean) {
972975
if (!this.isDisposed()) {
973976
this.animationTime = currentTime;
974977

@@ -981,7 +984,12 @@ export class Root implements IDisposer {
981984

982985
} else {
983986
if (!this._paused) {
984-
rAF(this.fps, this._ticker!);
987+
if (now) {
988+
this._ticker!
989+
}
990+
else {
991+
rAF(this.fps, this._ticker!);
992+
}
985993
}
986994
}
987995
}

src/.internal/core/render/Legend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export class Legend extends Series {
338338
dataItem.set("label", label);
339339

340340
label.text.on("text", () => {
341-
itemContainer.set("ariaLabel", label.text._getText() + "; " + this._t("Press ENTER to toggle"));
341+
itemContainer.set("ariaLabel", label.text._getText() + (this.get("clickTarget") !== "none" ? "; " + this._t("Press ENTER to toggle") : ""));
342342
});
343343

344344
if (item && item.get) {

0 commit comments

Comments
 (0)