kopia lustrzana https://github.com/rastapasta/mapscii
🎨 moving onDraw to onUpdate
rodzic
fcfb090a52
commit
8edd70c5bb
|
@ -184,7 +184,6 @@ module.exports = class Mapscii
|
||||||
#@notify JSON.stringify key
|
#@notify JSON.stringify key
|
||||||
|
|
||||||
_draw: ->
|
_draw: ->
|
||||||
config.onDraw() if config.onDraw
|
|
||||||
@renderer
|
@renderer
|
||||||
.draw @center, @zoom
|
.draw @center, @zoom
|
||||||
.then (frame) =>
|
.then (frame) =>
|
||||||
|
@ -209,6 +208,7 @@ module.exports = class Mapscii
|
||||||
"mouse: #{utils.digits @mousePosition.lat, 3}, #{utils.digits @mousePosition.lon, 3} "
|
"mouse: #{utils.digits @mousePosition.lat, 3}, #{utils.digits @mousePosition.lon, 3} "
|
||||||
|
|
||||||
notify: (text) ->
|
notify: (text) ->
|
||||||
|
config.onUpdate() if config.onUpdate
|
||||||
@_write "\r\x1B[K"+text unless config.headless
|
@_write "\r\x1B[K"+text unless config.headless
|
||||||
|
|
||||||
_write: (output) ->
|
_write: (output) ->
|
||||||
|
|
Ładowanie…
Reference in New Issue