From b97fab4fbcd9b4c9d394b11b76b35bedff02cb00 Mon Sep 17 00:00:00 2001 From: Max <m.giller.dev@gmail.com> Date: Sat, 31 Jul 2021 09:35:50 +0200 Subject: [PATCH] Renamed function for clarity --- editor/js/graph.js | 2 +- editor/js/manageddata.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/editor/js/graph.js b/editor/js/graph.js index 7d47f38..cefc9a4 100644 --- a/editor/js/graph.js +++ b/editor/js/graph.js @@ -43,7 +43,7 @@ class Graph extends ManagedData { this.triggerOnChange(); } - formatData(data) { + storableData(data) { return this.getCleanData(data, true); } diff --git a/editor/js/manageddata.js b/editor/js/manageddata.js index c83ddd7..d97d0d2 100644 --- a/editor/js/manageddata.js +++ b/editor/js/manageddata.js @@ -36,12 +36,12 @@ class ManagedData { return true; } - formatData(data) { + storableData(data) { return data; } storeCurrentData(description) { - var formattedData = this.formatData(this.data); + var formattedData = this.storableData(this.data); this.history.unshift({ description: description, @@ -51,5 +51,6 @@ class ManagedData { // Forget about the currently stored potential future this.history.splice(0, this.historyPosition); this.historyPosition = 0; + console.log(this.history[0]); } } -- GitLab