From d08a58f357b4a0cd30ddf7661f4ae1f40cae99b7 Mon Sep 17 00:00:00 2001 From: ZT <2417407179@qq.com> Date: Fri, 15 Jul 2022 10:24:27 +0800 Subject: [PATCH 1/3] style: spelling mistakes --- src/component/marker/MarkAreaView.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/component/marker/MarkAreaView.ts b/src/component/marker/MarkAreaView.ts index dcaa4b1c78..5d8b2dce70 100644 --- a/src/component/marker/MarkAreaView.ts +++ b/src/component/marker/MarkAreaView.ts @@ -91,7 +91,7 @@ const markAreaTransform = function ( return result; }; -function isInifinity(val: ScaleDataValue) { +function isInfinity(val: ScaleDataValue) { return !isNaN(val as number) && !isFinite(val as number); } @@ -103,7 +103,7 @@ function ifMarkAreaHasOnlyDim( coordSys: CoordinateSystem ) { const otherDimIndex = 1 - dimIndex; - return isInifinity(fromCoord[otherDimIndex]) && isInifinity(toCoord[otherDimIndex]); + return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]); } function markAreaFilter(coordSys: CoordinateSystem, item: MarkAreaMergedItemOption) { @@ -182,10 +182,10 @@ function getSingleMarkerEndPoint( const yAxis = coordSys.getAxis('y') as Axis2D; const x = data.get(dims[0], idx) as number; const y = data.get(dims[1], idx) as number; - if (isInifinity(x)) { + if (isInfinity(x)) { point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]); } - else if (isInifinity(y)) { + else if (isInfinity(y)) { point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]); } } From c7a8547bafaead6d81690a212434f7879abfc915 Mon Sep 17 00:00:00 2001 From: ZT <2417407179@qq.com> Date: Fri, 15 Jul 2022 10:41:39 +0800 Subject: [PATCH 2/3] style: spelling mistakes --- src/component/marker/MarkLineView.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/component/marker/MarkLineView.ts b/src/component/marker/MarkLineView.ts index d3d6a661d8..aa21d0bf25 100644 --- a/src/component/marker/MarkLineView.ts +++ b/src/component/marker/MarkLineView.ts @@ -154,7 +154,7 @@ const markLineTransform = function ( return normalizedItem; }; -function isInifinity(val: ScaleDataValue) { +function isInfinity(val: ScaleDataValue) { return !isNaN(val as number) && !isFinite(val as number); } @@ -167,7 +167,7 @@ function ifMarkLineHasOnlyDim( ) { const otherDimIndex = 1 - dimIndex; const dimName = coordSys.dimensions[dimIndex]; - return isInifinity(fromCoord[otherDimIndex]) && isInifinity(toCoord[otherDimIndex]) + return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]) && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]); } @@ -240,10 +240,10 @@ function updateSingleMarkerEndLayout( const xAxis = coordSys.getAxis('x') as Axis2D; const yAxis = coordSys.getAxis('y') as Axis2D; const dims = coordSys.dimensions; - if (isInifinity(data.get(dims[0], idx))) { + if (isInfinity(data.get(dims[0], idx))) { point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]); } - else if (isInifinity(data.get(dims[1], idx))) { + else if (isInfinity(data.get(dims[1], idx))) { point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]); } } From 6a261fb79a648c3a3986488975fd2d4943332f97 Mon Sep 17 00:00:00 2001 From: ZT <2417407179@qq.com> Date: Fri, 15 Jul 2022 10:57:51 +0800 Subject: [PATCH 3/3] style: spelling mistakes --- src/component/marker/MarkAreaView.ts | 2 +- src/component/marker/MarkLineView.ts | 2 +- src/component/marker/MarkPointView.ts | 2 +- src/component/marker/markerHelper.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/component/marker/MarkAreaView.ts b/src/component/marker/MarkAreaView.ts index 5d8b2dce70..785d107d87 100644 --- a/src/component/marker/MarkAreaView.ts +++ b/src/component/marker/MarkAreaView.ts @@ -164,7 +164,7 @@ function getSingleMarkerEndPoint( else { // Chart like bar may have there own marker positioning logic if (seriesModel.getMarkerPosition) { - // Use the getMarkerPoisition + // Use the getMarkerPosition point = seriesModel.getMarkerPosition( data.getValues(dims, idx) ); diff --git a/src/component/marker/MarkLineView.ts b/src/component/marker/MarkLineView.ts index aa21d0bf25..2c6d5e53e9 100644 --- a/src/component/marker/MarkLineView.ts +++ b/src/component/marker/MarkLineView.ts @@ -215,7 +215,7 @@ function updateSingleMarkerEndLayout( else { // Chart like bar may have there own marker positioning logic if (seriesModel.getMarkerPosition) { - // Use the getMarkerPoisition + // Use the getMarkerPosition point = seriesModel.getMarkerPosition( data.getValues(data.dimensions, idx) ); diff --git a/src/component/marker/MarkPointView.ts b/src/component/marker/MarkPointView.ts index d5e4fc1fa7..3e4499c0d4 100644 --- a/src/component/marker/MarkPointView.ts +++ b/src/component/marker/MarkPointView.ts @@ -51,7 +51,7 @@ function updateMarkerLayout( } // Chart like bar may have there own marker positioning logic else if (seriesModel.getMarkerPosition) { - // Use the getMarkerPoisition + // Use the getMarkerPosition point = seriesModel.getMarkerPosition( mpData.getValues(mpData.dimensions, idx) ); diff --git a/src/component/marker/markerHelper.ts b/src/component/marker/markerHelper.ts index 480a0345e5..1616df4226 100644 --- a/src/component/marker/markerHelper.ts +++ b/src/component/marker/markerHelper.ts @@ -191,7 +191,7 @@ export function dataFilter( }, item: MarkerPositionOption ) { - // Alwalys return true if there is no coordSys + // Always return true if there is no coordSys return (coordSys && coordSys.containData && item.coord && !hasXOrY(item)) ? coordSys.containData(item.coord) : true; } @@ -204,7 +204,7 @@ export function zoneFilter( item1: MarkerPositionOption, item2: MarkerPositionOption ) { - // Alwalys return true if there is no coordSys + // Always return true if there is no coordSys return (coordSys && coordSys.containZone && item1.coord && item2.coord && !hasXOrY(item1) && !hasXOrY(item2)) ? coordSys.containZone(item1.coord, item2.coord) : true; }