Modify variantOffset calculation logic

This commit is contained in:
tisilent
2023-08-25 14:17:36 +08:00
parent 08f7b4c53c
commit bec1642123
14 changed files with 51 additions and 89 deletions
+1 -1
View File
@@ -57,6 +57,6 @@ function createDimension(): IDimensions {
};
}
export function computeVarinatOffset(cellWidth: number, lineWidth: number, currentOffset: number = 0): number {
export function computeNextVarinatOffset(cellWidth: number, lineWidth: number, currentOffset: number = 0): number {
return (cellWidth - (Math.round(lineWidth) * 2 - currentOffset)) % (Math.round(lineWidth) * 2);
}