         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

                @last_page = n-1
        else
            # update page
            that = @
            page = @output.find(".salvus-editor-pdf-preview-page-#{n}")
            if page.length == 0

                '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?
