         if opts.delta?
             if not @zoom_width?
                 @zoom_width = 160   # NOTE: hardcoded also in editor.css class .salvus-editor-pdf-preview-image
-            max_width = @zoom_width#images.css('max-width')
+            max_width = @zoom_width
             max_width += opts.delta
         else if opts.width?
             max_width = opts.width

                setTimeout((()->img.attr('src',url)), 2000)
            img.on('error', load_error)

            if @zoom_width?
                max_width = @zoom_width
                margin_left = "#{-(max_width-100)/2}%"
                max_width = "#{max_width}%"
                img.css
                    'max-width'   : max_width
                    width         : max_width
                    'margin-left' : margin_left

            #page.find(".salvus-editor-pdf-preview-text").text(p.text)
        cb()

                'max-width'   : max_width
                width         : max_width
            @scroll_into_view(n : n, highlight_line:false, y:$(window).height()/2)

        @recenter()

    recenter: () =>
        container_width = @output.find(":first-child:first").width()
        content_width = @output.find("img:first-child:first").width()
        @output.scrollLeft((content_width - container_width)/2)

    watch_scroll: () =>
        if @_f?
