     page_zoom.checked = true
     current_tool?.el.classList.remove 'selected'
     current_tool = rectangles[rect_index]
-    w = current_tool?.mark.width + MARGIN * 2
-    h = current_tool?.mark.height + MARGIN * 2
-    scale = ms.el.parentNode.offsetWidth / w
-    ms.svg.attr 'width', scale * w
-    ms.svg.attr 'height', scale * h
-    ms.rescale current_tool?.mark.left - MARGIN, current_tool?.mark.top - MARGIN, w, h
+    subjectViewer.crop current_tool.mark, MARGIN if current_tool?
     current_tool?.el.classList.add 'selected'
   
   if task.key is 'details'

  @markingSurface.svg.attr
    width: scale * @maxWidth
    height: scale * @maxHeight

ClassifyPage = require 'zooniverse-readymade/lib/classify-page'


page_zoom.addEventListener 'change', (e) ->
  return unless current_tool?
  if @.checked
    subjectViewer.crop current_tool.mark, MARGIN
  else
    subjectViewer.rescale()
    ms.rescale 0, 0, subjectViewer.maxWidth, subjectViewer.maxHeight
