mirror of https://github.com/koreader/koreader
fix getAutoBBox failed bug
If getAutoBBox is fed with a blank page the returned bbox will be much smaller than the native page dimensions. The problem is that in zoom to 'content*' mode document renderer will try to render the whole page at a zoom level that can cover the screen with the bbox region of the page. That's if the blank page size is 3000*4000 and the returned autobbox is 300*400, the screen size is 600*800, then the page will be rendered in 3000*(600/300)*4000*(800/400) which is so large that the cache manager will not accept. This patch just check if the returned autobbox is considerablely much smaller than the native page dimensions. If so it will return the manual bbox. This patch should fix #293. And it's tested with the case provided by @Markismus in #291.pull/308/head
parent
3e94520e53
commit
2cd5a083ae
Loading…
Reference in New Issue