Skip to content

Commit 0de867f

Browse files
committed
fixup! ui-speedspacechart: fix non sticky unit icon on right axis
1 parent f1c512c commit 0de867f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ui-speedspacechart/src/components/const.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const SLOPE_FILL_COLOR = '#CFDDCE';
44

55
export const RIGHT_TICK_HEIGHT_OFFSET = 2;
66

7-
export const TICK_ICONS = {
7+
export const TICK_TITLE_MARGINS = {
88
Y_LEFT_VERTICAL: 30,
99
Y_LEFT_HORIZONTAL: 22,
1010
Y_RIGHT_VERTICAL: 36,

ui-speedspacechart/src/components/helpers/drawElements/gridY.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { DrawFunctionParams } from '../../../types/chartTypes';
2-
import { MARGINS, TICK_ICONS } from '../../const';
2+
import { MARGINS, TICK_TITLE_MARGINS } from '../../const';
33
import { clearCanvas, speedRangeValues } from '../../utils';
44

55
const { MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP, MARGIN_BOTTOM, CURVE_MARGIN_TOP } = MARGINS;
6-
const { Y_LEFT_VERTICAL, Y_LEFT_HORIZONTAL } = TICK_ICONS;
6+
const { Y_LEFT_VERTICAL, Y_LEFT_HORIZONTAL } = TICK_TITLE_MARGINS;
77

88
export const drawGridY = ({ ctx, width, height, store }: DrawFunctionParams) => {
99
const { speeds } = store;

ui-speedspacechart/src/components/helpers/drawElements/tickYRight.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { DrawFunctionParams } from '../../../types/chartTypes';
2-
import { MARGINS, TICK_ICONS, RIGHT_TICK_HEIGHT_OFFSET } from '../../const';
2+
import { MARGINS, TICK_TITLE_MARGINS, RIGHT_TICK_HEIGHT_OFFSET } from '../../const';
33
import { clearCanvas, slopesValues } from '../../utils';
44

55
const { MARGIN_LEFT, MARGIN_TOP, MARGIN_BOTTOM, RIGHT_TICK_MARGINS } = MARGINS;
6-
const { Y_RIGHT_VERTICAL, Y_RIGHT_HORIZONTAL } = TICK_ICONS;
6+
const { Y_RIGHT_VERTICAL, Y_RIGHT_HORIZONTAL } = TICK_TITLE_MARGINS;
77

88
export const drawTickYRight = ({ ctx, width, height, store }: DrawFunctionParams) => {
99
clearCanvas(ctx, width, height);

0 commit comments

Comments
 (0)