This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch fix/geo-svg in repository https://gitbox.apache.org/repos/asf/echarts.git
commit cc7001d801728e545b6880fd2e3d94ba49aaf4e9 Author: 100pah <[email protected]> AuthorDate: Tue Feb 9 16:52:03 2021 +0800 fix: tweak --- src/coord/View.ts | 5 +++-- src/coord/geo/Geo.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/coord/View.ts b/src/coord/View.ts index f724650..17bafc8 100644 --- a/src/coord/View.ts +++ b/src/coord/View.ts @@ -77,14 +77,14 @@ class View extends Transformable implements CoordinateSystemMaster, CoordinateSy } setViewRect(x: number, y: number, width: number, height: number): void { - this.transformTo(x, y, width, height); + this._transformTo(x, y, width, height); this._viewRect = new BoundingRect(x, y, width, height); } /** * Transformed to particular position and size */ - transformTo(x: number, y: number, width: number, height: number): void { + protected _transformTo(x: number, y: number, width: number, height: number): void { const rect = this.getBoundingRect(); const rawTransform = this._rawTransformable; @@ -92,6 +92,7 @@ class View extends Transformable implements CoordinateSystemMaster, CoordinateSy new BoundingRect(x, y, width, height) ); + // Hint: only works before `this._updateTransform` firstly called. rawTransform.decomposeTransform(); this._updateTransform(); diff --git a/src/coord/geo/Geo.ts b/src/coord/geo/Geo.ts index 75b92cb..85a3954 100644 --- a/src/coord/geo/Geo.ts +++ b/src/coord/geo/Geo.ts @@ -82,7 +82,7 @@ class Geo extends View { return false; } - transformTo(x: number, y: number, width: number, height: number): void { + protected _transformTo(x: number, y: number, width: number, height: number): void { let rect = this.getBoundingRect(); const invertLongitute = this._invertLongitute; @@ -99,6 +99,7 @@ class Geo extends View { new BoundingRect(x, y, width, height) ); + // Hint: only works before `this._updateTransform` firstly called. rawTransformable.decomposeTransform(); if (invertLongitute) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
