 
   # PB This is not returning anything but 0, 0 for me; Seems like @refs.sizeRect is empty when evaluated (though nonempty later)
   getScale: ->
-    console.log "getScale()"
+    console.log "getScale() is being called"
     rect = @refs.sizeRect?.getDOMNode().getBoundingClientRect()
     return {horizontal: 1, vertical: 1} if ! rect? || ! rect.width?
     rect ?= width: 0, height: 0
-    horizontal = rect.width / @state.imageWidth
-    vertical = rect.height / @state.imageHeight
+    horizontal = rect.width / @props.subject.width
+    vertical = rect.height / @props.subject.height
     # TODO hack fallback:
     return {horizontal, vertical}
 


  render: ->
    return null if ! @props.active

    viewBox = [0, 0, @state.imageWidth, @state.imageHeight]
    # ToolComponent = @state.tool # AMS:from classification refactor.
    scale = @getScale()

    # if @props.workflow.name is 'transcribe'


  componentDidMount: ->
    console.log "____>>componen DID mount"
    @setView 0, 0, @props.subject.width, @props.subject.height
    @loadImage @props.subject.location.standard
    window.addEventListener "resize", this.updateDimensions

