aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/editor.mjs21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/editor.mjs b/src/editor.mjs
index 29e7052..d75d1ec 100644
--- a/src/editor.mjs
+++ b/src/editor.mjs
@@ -193,7 +193,6 @@ const editor = new EasyMDE({
193 193
194const cm = editor.codemirror 194const cm = editor.codemirror
195 195
196
197const getRefLinks = () => editor.value() 196const getRefLinks = () => editor.value()
198 .split('\n') 197 .split('\n')
199 .map(line => { 198 .map(line => {
@@ -779,13 +778,13 @@ const getSuggestions = anchor => {
779 return rendererSuggestions.length === 0 778 return rendererSuggestions.length === 0
780 ? [] 779 ? []
781 : [ 780 : [
782 ...rendererSuggestions, 781 ...rendererSuggestions,
783 new menuItem.Item({ 782 new menuItem.Item({
784 innerHTML: '<a href="https://github.com/outdoorsafetylab/mapclay#renderer" class="external" style="display: block;">More...</a>', 783 innerHTML: '<a href="https://github.com/outdoorsafetylab/mapclay#renderer" class="external" style="display: block;">More...</a>',
785 className: ['suggestion'], 784 className: ['suggestion'],
786 onclick: () => window.open('https://github.com/outdoorsafetylab/mapclay#renderer', '_blank') 785 onclick: () => window.open('https://github.com/outdoorsafetylab/mapclay#renderer', '_blank')
787 }) 786 })
788 ] 787 ]
789 } 788 }
790 return [] 789 return []
791} 790}
@@ -940,7 +939,7 @@ const addMapRandomlyByPreset = () => {
940 const yamlText = [ 939 const yamlText = [
941 'apply: dist/default.yml', 940 'apply: dist/default.yml',
942 'width: 85%', 941 'width: 85%',
943 'height: 200px', 942 'height: 200px'
944 ] 943 ]
945 const order = [ 944 const order = [
946 'id', 945 'id',
@@ -954,8 +953,8 @@ const addMapRandomlyByPreset = () => {
954 ] 953 ]
955 const aliasesEntries = Object.entries(aliasesForMapOptions) 954 const aliasesEntries = Object.entries(aliasesForMapOptions)
956 .filter(([key, _]) => 955 .filter(([key, _]) =>
957 order.includes(key) 956 order.includes(key) &&
958 && !yamlText.find(text => text.startsWith(key)) 957 !yamlText.find(text => text.startsWith(key))
959 ) 958 )
960 if (aliasesEntries.length === 0) return 959 if (aliasesEntries.length === 0) return
961 960