Skip to content

Commit

Permalink
Merge pull request mermaid-js#888 from johannchopin/feature/improve-v…
Browse files Browse the repository at this point in the history
…iew-button

improve button to be link
  • Loading branch information
sidharthv96 committed Jul 9, 2022
2 parents 57df1cf + 950de30 commit 91c3564
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/routes/edit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@
}
};
const viewDiagram = () => {
window.open(`${base}/view#${$stateStore.serialized}`, '_blank').focus();
};
onMount(async () => {
await initHandler();
const resizer = document.getElementById('resizeHandler');
Expand Down Expand Up @@ -181,11 +177,13 @@
<div id="resizeHandler" class="hidden md:block" />
<div class="flex-1 flex flex-col overflow-hidden">
<Card title="Diagram" isCloseable={false}>
<button
<a
href={`${base}/view#${$stateStore.serialized}`}
target="_blank"
slot="actions"
class="btn btn-secondary btn-xs"
title="View diagram in new page"
on:click|stopPropagation={() => viewDiagram()}><i class="far fa-eye mr-1" />View</button>
><i class="fas fa-external-link-alt mr-1" />Full screen</a>

<div class="flex-1 overflow-auto">
<View />
Expand Down

0 comments on commit 91c3564

Please sign in to comment.