get/set example (#4990)

This commit is contained in:
zdenko 2018-02-25 09:18:57 +01:00 committed by Geoffrey Booth
parent 0875039d52
commit 7542a75ff8
1 changed files with 1 additions and 1 deletions

View File

@ -6,4 +6,4 @@ Object.defineProperty screen, 'height',
get: ->
this.width / this.ratio
set: (val) ->
this.width = val / this.ratio
this.width = val * this.ratio