mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV Should avoid passing nonsensical floating point coordinates/dimensions to the UI code. * Update base * https://github.com/koreader/koreader-base/pull/1113 * https://github.com/koreader/koreader-base/pull/1114 * https://github.com/koreader/koreader-base/pull/1115 * Bump android-luajit-launcher https://github.com/koreader/android-luajit-launcher/pull/230 https://github.com/koreader/android-luajit-launcher/pull/231
This commit is contained in:
@@ -36,7 +36,7 @@ describe("InputContainer widget", function()
|
||||
assert.is.same("bar", ic._ordered_touch_zones[2].def.id)
|
||||
assert.is.same("tap", ic._ordered_touch_zones[2].gs_range.ges)
|
||||
assert.is.same(0, ic._ordered_touch_zones[2].gs_range.range.x)
|
||||
assert.is.same(screen_height * 0.1, ic._ordered_touch_zones[2].gs_range.range.y)
|
||||
assert.is.same(math.floor(screen_height * 0.1), ic._ordered_touch_zones[2].gs_range.range.y)
|
||||
assert.is.same(screen_width / 2, ic._ordered_touch_zones[2].gs_range.range.w)
|
||||
assert.is.same(screen_height, ic._ordered_touch_zones[2].gs_range.range.h)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user