Skip to content

Commit 4f24722

Browse files
committed
File saving doesn't work #2
1 parent ca406ea commit 4f24722

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

MermaidEditor/LivePreview/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@
152152
})
153153
}
154154

155-
async function getPNG(save = true) {
155+
export async function getPNG(save = true)
156+
{
157+
console.log(`getPNG(${save})`);
158+
156159
var svgElem = document.querySelector('svg');
157160
var canvas = document.querySelector('canvas');
158161
var ctx = canvas.getContext("2d");
@@ -164,12 +167,13 @@
164167

165168
await drawInlineSVG(svgElem, ctx);
166169
var img = canvas.toDataURL("image/png");
167-
//console.log(img);
170+
console.log(img);
168171
if (save) {
169172
sendMessage(img);
170173
}
171174
return img;
172175
}
176+
window.getPNG = getPNG;
173177

174178
mermaid.parseError = (error, hash) => {
175179
console.log("mermaid.parseError \r\n");

MermaidEditor/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
// You can specify all the values or you can default the Build and Revision Numbers
3030
// by using the '*' as shown below:
3131
// [assembly: AssemblyVersion("1.0.*")]
32-
[assembly: AssemblyVersion("10.1.0.0")]
33-
[assembly: AssemblyFileVersion("10.1.0.0")]
32+
[assembly: AssemblyVersion("10.1.0.1")]
33+
[assembly: AssemblyFileVersion("10.1.0.1")]

MermaidEditor/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="Mermaid.EditorForVisualStudio.e5c82390-1fc1-4d02-8b2d-d732b369ffc6" Version="10.1.0.0" Language="en-US" Publisher="NeVeS" />
4+
<Identity Id="Mermaid.EditorForVisualStudio.e5c82390-1fc1-4d02-8b2d-d732b369ffc6" Version="10.1.0.1" Language="en-US" Publisher="NeVeS" />
55
<DisplayName>Mermaid editor for Visual Studio</DisplayName>
66
<Description xml:space="preserve">A very simple editor for Mermaid files(*.mmd, *.mermaid). It offers live preview, syntax highlighting and generates diagrams in *.svg and *.png formats.</Description>
77
<MoreInfo>https://github.com/NeVeSpl/MermaidEditorForVisualStudio</MoreInfo>

0 commit comments

Comments
 (0)