mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bugfix: make a fresh copy of Geom before transforming
This commit is contained in:
@@ -237,7 +237,7 @@ end
|
||||
function ReaderView:getScrollPageRect(page, rect_p)
|
||||
local rect_s = Geom:new{}
|
||||
for _, state in ipairs(self.page_states) do
|
||||
local trans_p = Geom:new(rect_p)
|
||||
local trans_p = Geom:new(rect_p):copy()
|
||||
trans_p:transformByScale(state.zoom, state.zoom)
|
||||
if page == state.page and state.visible_area:contains(trans_p) then
|
||||
rect_s.x = rect_s.x + state.offset.x + trans_p.x - state.visible_area.x
|
||||
@@ -287,7 +287,7 @@ end
|
||||
|
||||
function ReaderView:getSinglePageRect(rect_p)
|
||||
local rect_s = Geom:new{}
|
||||
local trans_p = Geom:new(rect_p)
|
||||
local trans_p = Geom:new(rect_p):copy()
|
||||
trans_p:transformByScale(self.state.zoom, self.state.zoom)
|
||||
if self.visible_area:contains(trans_p) then
|
||||
rect_s.x = self.state.offset.x + trans_p.x - self.visible_area.x
|
||||
|
||||
Reference in New Issue
Block a user