~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/oeb/display/paged.coffee

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-02-27 07:48:06 UTC
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: package-import@ubuntu.com-20140227074806-64wdebb3ptosxhhx
Tags: upstream-1.25.0+dfsg
ImportĀ upstreamĀ versionĀ 1.25.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
            # with height=100% overflow the first column
177
177
            has_svg = document.getElementsByTagName('svg').length > 0
178
178
            only_img = document.getElementsByTagName('img').length == 1 and document.getElementsByTagName('div').length < 3 and document.getElementsByTagName('p').length < 2
179
 
            this.is_full_screen_layout = (only_img or has_svg) and single_screen and document.body.scrollWidth > document.body.clientWidth
 
179
            # We only set full_screen_layout if scrollWidth is in (body_width,
 
180
            # 2*body_width) as if it is <= body_width scrolling will work
 
181
            # anyway and if it is >= 2*body_width it can't be a full screen
 
182
            # layout
 
183
            body_width = document.body.offsetWidth + 2 * sm
 
184
            this.is_full_screen_layout = (only_img or has_svg) and single_screen and document.body.scrollWidth > body_width and document.body.scrollWidth < 2 * body_width
180
185
            if is_single_page
181
186
                this.is_full_screen_layout = true
182
187