   onScrollEntryEditor: (event) ->
     # Calculate which page we should be on.
     scrollLeft = event.target.scrollLeft
-    scale = LOI.adventure.interface.display.scale()
+    scale = @display.scale()
 
     options = @journalDesign.writingAreaOptions()
     viewportWidth = options.pagesPerViewport * (options.width + options.gap)

  writingAreaStyle: ->
    options = @journalDesign.writingAreaOptions()

    # Always show two additional viewport worth of pages, so that
    # there is enough content for scrolling to reach its desired place.
    displayedPages = @currentPageIndex() + 3 * options.pagesPerViewport
    width = displayedPages * options.width + (displayedPages - 1) * options.gap

    left: "#{options.left}rem"


  _updateEntryEditorScrollLeft: ->
    pageIndex = @currentPageIndex()
    scale = @display.scale()
    options = @journalDesign.writingAreaOptions()

    viewportWidth = options.pagesPerViewport * (options.width + options.gap)
