Skip to content

Commit

Permalink
#128 remove initialisation for unused options, it tried to get elemen…
Browse files Browse the repository at this point in the history
…t by undefined
  • Loading branch information
ivictbor committed Apr 23, 2021
1 parent a65bf02 commit 0e30138
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@
//availableEraserWidths: [1,2,4,8,16,64],
//availableFontSizes: [1,2,4,8,16,64],
//availableArrowLengths: [10,20,30,40,50,60],
// how_to_paste_actions: ['paste_over', 'replace_all'],
saveHandler: (saver, done) => {
console.log('saving', saver.getWidth(), saver.getHeight())
console.log('hasAlphaChannel', saver.hasAlphaChannel())
how_to_paste_actions: ['paste_over', 'replace_all'],
//saveHandler: (saver, done) => {
// console.log('saving', saver.getWidth(), saver.getHeight())
// console.log('hasAlphaChannel', saver.hasAlphaChannel())
// console.log('Base64', saver.asDataURL())
done(true);
}
// done(true);
//}
//toolbarPosition: 'top',
// fixMobilePageReloader: false,
// defaultTool: 'line',
//hiddenTools: ['line']
}).show('https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Gutenberg.jpg/300px-Gutenberg.jpg?12')
}).show()
const ctx = window.p.ctx;

// ctx.beginPath();
Expand Down
2 changes: 1 addition & 1 deletion js/inserter.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class Inserter {
this.cancelChoosing();
this.img = null;
this.mimetype = null; // mime of pending image
Object.keys(this.pasteOptions).forEach((k) => {
this.getAvailableOptions().forEach((k) => {
const o = this.pasteOptions[k];
this.main.doc.getElementById(o.id).onclick = () => {
if (this.loading) {
Expand Down

0 comments on commit 0e30138

Please sign in to comment.