我使用HTML5 Canvas创建了一个相框,并用div标签包围画布,以添加像图像一样的相框。此用法将图像拖放到相框内的画布内。现在困难的部分是他们如何分享?通过脸书,推特和脸书在画布内的相框和图像。我是否在相框和画布周围创建了一个额外的框架?我该怎么办?请帮忙!
这是我的代码
var holder = document.getElementById('holder'),
tests = {
filereader: typeof FileReader != 'undefined',
dnd: 'draggable' in document.createElement('span'),
formdata: !!window.FormData,
progress: "upload" in new XMLHttpRequest
},
support = {
filereader: document.getElementById('filereader'),
formdata: document.getElementById('formdata'),
progress: document.getElementById('progress')
},
acceptedTypes = {
'image/png': true,
'image/jpeg': true,
'image/gif': true
},
progress = document.getElementById('uploadprogress'),
fileupload = document.getElementById('upload');