ScorecardCanvas.centerView Method

Places the current view port to the center of the playground.
 

Parameters

viewModel

Type: CanvasSelectableViewModel - May be null
(Optional) The viewmodel to center the view on, if null, center on center of playground.
centerTop

Type: Boolean - May be null
(Optional) Center view horizontally, but top vertically.
Options

Type: Object - May be null

     Options:
     leftIfViewportTooSmall - [type:"Boolean" Default:false] Set vision to left most if the viewport cannot contain entire canvas width.
     topIfBackgroundTooLarge - [type: "Boolean" Default:false] Set vision to the top if the background is larger than the viewport.