From c441663528cd7af5fd285d9bfb136d50ae1d67b3 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Mon, 27 Jul 2020 09:44:09 +0200 Subject: [PATCH] Move singleton object into JSONNode --- src/components/JSONNode.svelte | 7 ++++++- src/singleton.js | 5 ----- 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 src/singleton.js diff --git a/src/components/JSONNode.svelte b/src/components/JSONNode.svelte index 85eff22..74ecca6 100644 --- a/src/components/JSONNode.svelte +++ b/src/components/JSONNode.svelte @@ -11,7 +11,6 @@ STATE_SEARCH_VALUE, INDENTATION_WIDTH } from '../constants.js' - import { singleton } from '../singleton.js' import { getPlainText, isAppendNodeSelector, @@ -39,6 +38,12 @@ export let onLimit export let onSelect export let selection + + const singleton = { + mousedown: false, + selectionAnchor: null, // Path + selectionFocus: null // Path + } $: expanded = state && state[STATE_EXPANDED] $: limit = state && state[STATE_LIMIT] diff --git a/src/singleton.js b/src/singleton.js deleted file mode 100644 index 4e6ef66..0000000 --- a/src/singleton.js +++ /dev/null @@ -1,5 +0,0 @@ -export const singleton = { - mousedown: false, - selectionAnchor: null, // Path - selectionFocus: null // Path -}