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