ker/mod/tfw.view.cropped-image.js
function cropHorizontally( img ) {
  var zoom = this.height / img.height;
  var x = 0;
  if( this.cropping == 'body' ) {
    x = 0.5 * (this.width - img.width * zoom);
  }
  else if( this.cropping == 'tail' ) {
    x = this.width - img.width * zoom;
  }
  draw.call( this, img, x, 0, zoom );
}
function cropHorizontally( img ) {
  var zoom = this.height / img.height;
  var x = 0;
  if( this.cropping == 'body' ) {
    x = 0.5 * (this.width - img.width * zoom);
  }
  else if( this.cropping == 'tail' ) {
    x = this.width - img.width * zoom;
  }
  draw.call( this, img, x, 0, zoom );
}
function cropHorizontally ( img ) { var zoom = this . height / img . height ; var x = 0 ; if ( this . cropping == 'body' ) { x = 0.5 * ( this . width - img . width * zoom ) ; } else if ( this . cropping == 'tail' ) { x = this . width - img . width * zoom ; } draw . call ( this , img , x , 0 , zoom ) ; }
If img is set to have the same height as the view, it will overflow horizontally.
If img is set to have the same height as the view it will overflow horizontally .