Skip to content

Commit fe5eed2

Browse files
committed
Merge pull request #2980 from rakieldev/fixes
fix: tween always snaping on wrap
2 parents 584c28c + 727482f commit fe5eed2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

external/script/start.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ function start.f_drawCursor(pn, x, y, param, done)
10921092
cd.slideOffset[1], cd.slideOffset[2] = 0, 0
10931093
end
10941094

1095-
if motif.select_info['p' .. pn].cursor.tween.wrap.snap then
1095+
if motif.select_info['p' .. pn].cursor.tween.wrap.snap ~= 0 then
10961096
local dx = cd.targetPos[1] - cd.startPos[1]
10971097
local dy = cd.targetPos[2] - cd.startPos[2]
10981098
if math.abs(dx) > motif.select_info.cell.size[1] * (motif.select_info.columns - 1) or math.abs(dy) > motif.select_info.cell.size[2] * (motif.select_info.rows - 1) then

src/motif.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ type BoxBgProperties struct {
208208

209209
type TweenProperties struct {
210210
Factor [2]float32 `ini:"factor"`
211-
Snap int32 `ini:"snap"`
211+
Snap bool `ini:"snap"`
212212
Wrap struct {
213-
Snap int32 `ini:"snap"`
213+
Snap bool `ini:"snap"`
214214
} `ini:"wrap"`
215215
}
216216

0 commit comments

Comments
 (0)