From 6266763f32dcf0902fcedb4075013de25cfc8819 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 19 Jan 2017 10:29:39 -0700 Subject: [PATCH] Clear all managed layers --- scripts/core/keyboard.js | 8 +++++++- scripts/modules/typographe.js | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/core/keyboard.js b/scripts/core/keyboard.js index 6dadbf2..e32d193 100644 --- a/scripts/core/keyboard.js +++ b/scripts/core/keyboard.js @@ -75,6 +75,12 @@ function Keyboard() this.key_escape = function() { commander.hide(); - ronin.overlay.clear(); + + // Clear managed layers + Object.keys(ronin.surface.layers).forEach(function (key) { + if(ronin.surface.layers[key].manager){ + ronin.surface.layers[key].clear(); + } + }); } } diff --git a/scripts/modules/typographe.js b/scripts/modules/typographe.js index ebdd367..26174c8 100644 --- a/scripts/modules/typographe.js +++ b/scripts/modules/typographe.js @@ -60,7 +60,7 @@ function Typographe(rune) { this.click = true; ronin.overlay.draw(position); - commander.element_input.value = "& "+position.render(); + commander.element_input.value = "& "+position.render()+" "; commander.hint.update(); }