From 042e376c2b207129f728461503651189823c79de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Thu, 16 May 2019 11:57:16 +0200 Subject: [PATCH] [IMP] playground: debounce some handlers --- extras/playground/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extras/playground/app.js b/extras/playground/app.js index b7159496..72753769 100644 --- a/extras/playground/app.js +++ b/extras/playground/app.js @@ -78,6 +78,10 @@ class App extends owl.Component { leftPaneWidth: Math.ceil(window.innerWidth / 2), topPanelHeight: null }; + + this.toggleLayout = owl.utils.debounce(this.toggleLayout, 250, true); + this.runCode = owl.utils.debounce(this.runCode, 250, true); + this.downloadCode = owl.utils.debounce(this.downloadCode, 250, true); } displayError(error) { @@ -254,6 +258,7 @@ class TabbedEditor extends owl.Component { this.state = { currentTab: props.js ? "js" : props.xml ? "xml" : "css" }; + this.setTab = owl.utils.debounce(this.setTab, 250, true); } mounted() {