Skip to content

Commit

Permalink
yaml: showMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
eyssette committed Oct 15, 2024
1 parent 2401f92 commit 85e1c85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/lib/Menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
saveAs
} from 'file-saver-es';
export let showMenu;
let urlToShare;
let encodageHash;
let showMenu = false;
let menu;
function menuEdit() {
Expand All @@ -43,8 +43,6 @@
}
if($url && $url.searchParams && $url.searchParams.get('m')==0) {
showMenu = false;
} else {
showMenu = true;
}
function menuShare() {
Expand Down
1 change: 1 addition & 0 deletions src/lib/stores.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ maxWidth: 600
- Pour contrôler l'interactivité
- \`\`\`automaticResize: false\`\`\` \\\\pour supprimer le \\\\redimensionnement automatique
- \`\`\`focusOnBranch: true\`\`\` \\\\pour focaliser sur la branche \\\\sur laquelle on clique et fermer\\\\automatiquement les autres
- \`\`\`showMenu: false\`\`\` \\\\pour cacher le menu
`));
export const baseURL = writable('');
export const mindmapSaveAsSvg = writable(false);
Expand Down
5 changes: 4 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
markdownSource,
baseURL
} from '../lib/stores.js'
let showMenu = true;
let encodageHash;
let yamlData;
let mindmapData;
Expand Down Expand Up @@ -127,6 +129,7 @@
openLinksInNewTab = yamlData.hasOwnProperty('openLinksInNewTab') ? yamlData.openLinksInNewTab : false;
focusOnBranch = yamlData.hasOwnProperty('focusOnBranch') ? yamlData.focusOnBranch : false;
automaticResize = yamlData.hasOwnProperty('automaticResize') ? yamlData.automaticResize : true;
showMenu = yamlData.hasOwnProperty('showMenu')? yamlData.showMenu : true;
curves = yamlData.hasOwnProperty('curves') ? yamlData.curves : true;
theme = yamlData.hasOwnProperty('theme') ? yamlData.theme : '';
if(theme == 'focus' || theme == 'nolines' || theme == 'black') {
Expand Down Expand Up @@ -162,7 +165,7 @@
</script>


<Menu source={$markdownSource} />
<Menu source={$markdownSource} {showMenu}/>

<main>

Expand Down

0 comments on commit 85e1c85

Please sign in to comment.