From 73b2d6b2c0a98ca6ff8fa4f72c2689da030bdd44 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 21 Dec 2017 06:41:30 +0100 Subject: [PATCH] remote control: rename `/EDIT_SOFT` to `/EDIT/MERGE` --- CHANGELOG.md | 2 ++ resources/docs/extras/remote-control.md | 2 +- src/browser/js/app/remote-control.js | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f481e62..38ff37f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ - plots: **new** `image` widget - remote control - **removed** deprecated `/EXEX` + - renamed `/EDIT_SOFT` to `/EDIT/MERGE` + ## 0.21.3 diff --git a/resources/docs/extras/remote-control.md b/resources/docs/extras/remote-control.md index 6c3f5073..8fea28f0 100644 --- a/resources/docs/extras/remote-control.md +++ b/resources/docs/extras/remote-control.md @@ -16,7 +16,7 @@ Apply a set of options to an existing widget by replacing the old ones with the !!! warning "" Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea -## `/EDIT_SOFT id options` +## `/EDIT_/MERGE id options` Apply a set of options to an existing widget by merging them to the widget's options. diff --git a/src/browser/js/app/remote-control.js b/src/browser/js/app/remote-control.js index 2dd367f3..7cb1e2d2 100644 --- a/src/browser/js/app/remote-control.js +++ b/src/browser/js/app/remote-control.js @@ -21,7 +21,7 @@ var callbacks = { updateDom(container,data,true) } }, - '/EDIT_SOFT': function(args) { + '/EDIT/MERGE': function(args) { if (READ_ONLY) return @@ -83,6 +83,9 @@ var callbacks = { } } +// backward-compatibility +callbacks['/EDIT_SOFT'] = callbacks['/EDIT/MERGE'] + module.exports = { exec: function(name, args){ if (callbacks[name]) {