Convert QR.oekaki.draw to $.global.
This commit is contained in:
parent
29785d59b1
commit
cb453b068d
@ -1,19 +1,16 @@
|
||||
QR.oekaki =
|
||||
draw: ->
|
||||
$.globalEval '''
|
||||
Tegaki.open({
|
||||
onDone: function() {
|
||||
Tegaki.flatten().toBlob(function (blob) {
|
||||
var detail = {file: blob, name: 'tegaki.png'};
|
||||
var event = new CustomEvent('QRSetFile', {bubbles: true, detail: detail});
|
||||
document.dispatchEvent(event);
|
||||
});
|
||||
},
|
||||
onCancel: function() {},
|
||||
width: +document.querySelector('#qr [name=oekaki-width]').value,
|
||||
$.global ->
|
||||
{Tegaki} = window
|
||||
Tegaki.open
|
||||
onDone: ->
|
||||
Tegaki.flatten().toBlob (file) ->
|
||||
document.dispatchEvent new CustomEvent 'QRSetFile',
|
||||
bubbles: true
|
||||
detail: {file, name: 'tegaki.png'}
|
||||
onCancel: ->
|
||||
width: +document.querySelector('#qr [name=oekaki-width]').value
|
||||
height: +document.querySelector('#qr [name=oekaki-height]').value
|
||||
});
|
||||
'''
|
||||
|
||||
edit: ->
|
||||
$.global ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user