Skip to content

Commit

Permalink
💩 🐛 Add a temporary solution for fixing export/clipboard copy buttons…
Browse files Browse the repository at this point in the history
… on "rendered image" screen
  • Loading branch information
CosmoMyzrailGorynych committed Apr 14, 2019
1 parent 96788f1 commit 2714884
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/riotTags/editor-screen.tag
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ editor-screen
};
this.copyToClipboard = e => {
var clip = nw.Clipboard.get();
clip.set(this.currentResult.toDataURL(), 'png');
clip.set(this.currentResult.toDataURL? this.currentResult.toDataURL() : this.currentResult.src, 'png');
};
this.exportPNG = e => {
this.imageSaveFormat = 'png';
Expand All @@ -160,9 +160,9 @@ editor-screen
this.finishExportImage = e => {
var data;
if (this.imageSaveFormat === 'jpg') {
data = this.currentResult.toDataURL('image/jpeg');
data = this.currentResult.toDataURL? this.currentResult.toDataURL('image/jpeg') : this.currentResult.src;
} else {
data = this.currentResult.toDataURL();
data = this.currentResult.toDataURL? this.currentResult.toDataURL() : this.currentResult.src;
}
data = data.replace(/^data:image\/\w+;base64,/, '');
var buff = new Buffer(data, 'base64');
Expand Down

0 comments on commit 2714884

Please sign in to comment.