Skip to content

Commit 6461326

Browse files
committed
fix(various): small various fixes
1 parent 3ce2eea commit 6461326

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/lyric/hypen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ func (li *lyricInteractor) CalculateHypen(ctx context.Context, prevLyric, curren
3838
return nil
3939
}
4040

41-
// every 20% of layout has 3 hypen
42-
container := (constant.LAYOUT_WIDTH - (2 - constant.LAYOUT_INDENT_LENGTH)) / 6
41+
// every 1/6 of layout has 3 hypen
42+
container := (constant.LAYOUT_WIDTH - (2 * constant.LAYOUT_INDENT_LENGTH)) / 6
4343
if distance < float64(container) {
4444
offset := (distance / 2) - hypenWidth
4545
if offset < 0 {

internal/rhythm/splitter/quater.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (qs *quaterSpliiter) Split(ctx context.Context, notes []*entity.NoteRendere
8282

8383
if leftIdx >= 0 {
8484
for i, v := range eigthSegment {
85-
if i < leftIdx {
85+
if i <= leftIdx {
8686
unprocessedSegment = append(unprocessedSegment, v)
8787
}
8888
}

0 commit comments

Comments
 (0)