You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/04/22 03:15:37 UTC

[GitHub] [echarts] pissang commented on a diff in pull request #16904: feat(View): `View` center supports `string`

pissang commented on code in PR #16904:
URL: https://github.com/apache/echarts/pull/16904#discussion_r855734713


##########
src/chart/graph/createView.ts:
##########
@@ -77,7 +77,7 @@ export default function createViewCoordSys(ecModel: GlobalModel, api: ExtensionA
             const viewWidth = viewRect.width;
             const viewHeight = viewRect.height;
 
-            const viewCoordSys = seriesModel.coordinateSystem = new View();

Review Comment:
   The parameters of coordinate system constructors should be as consistent as possible. The `api` can be an parameter of `setCenter`. 
   
   Or a better solution I think is convert percent value to absolute value before `setCenter`. In some context like 
   https://github.com/apache/echarts/blob/4a52199842039d7fa6019ee8584d1a395fbc771a/src/action/roamHelper.ts#L82
   It will always be a calculated absolute value 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org