Respecting coordinates setting.

This commit is contained in:
Nick Winter 2014-09-23 18:39:52 -07:00
parent e493855578
commit 019f634d9f
3 changed files with 5 additions and 3 deletions

View file

@ -47,7 +47,7 @@ module.exports = Surface = class Surface extends CocoClass
grid: false
navigateToSelection: true
choosing: false # 'point', 'region', 'ratio-region'
coords: true
coords: null # use world defaults, or set to false/true to overrid
playJingle: false
showInvisible: false
frameRate: 30 # Best as a divisor of 60, like 15, 30, 60, with RAF_SYNCHED timing.
@ -123,7 +123,8 @@ module.exports = Surface = class Surface extends CocoClass
initCoordinates: ->
@coordinateGrid ?= new CoordinateGrid {camera: @camera, layer: @gridLayer, textLayer: @surfaceTextLayer}, @world.size()
@coordinateGrid.showGrid() if @world.showGrid or @options.grid
@coordinateDisplay ?= new CoordinateDisplay camera: @camera, layer: @surfaceTextLayer if @world.showCoordinates or @options.coords
showCoordinates = if @options.coords? then @options.coords else @world.showCoordinates
@coordinateDisplay ?= new CoordinateDisplay camera: @camera, layer: @surfaceTextLayer if showCoordinates
hookUpChooseControls: ->
chooserOptions = stage: @stage, surfaceLayer: @surfaceLayer, camera: @camera, restrictRatio: @options.choosing is 'ratio-region'

View file

@ -50,7 +50,7 @@ module.exports = class WorldSelectModal extends ModalView
grid: true
navigateToSelection: false
choosing: @dataType
coords: false
coords: true
thangTypes: @supermodel.getModels(ThangType)
showInvisible: true
}

View file

@ -188,6 +188,7 @@ module.exports = class ThangsTabView extends CocoView
@surface = new Surface @world, surfaceCanvas, {
wizards: false
paths: false
coords: true
grid: true
navigateToSelection: false
thangTypes: @supermodel.getModels(ThangType)