FoundOPS / server

www.foundops.com
1 stars 0 forks source link

Cannot undo the first image until Blob Storage supports CORS #121

Open jperl opened 12 years ago

jperl commented 12 years ago

//http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/2850796-support-cross-origin-resource-sharing-cors-via-a // var img = imageUpload.cropBox.get(0); // imageUpload.cropBox.on("load", function () { // //if the image data was not set on the settings (on the first load), create it from the image // //http://stackoverflow.com/questions/934012/get-image-data-in-javascript // if (vm.get("settings.imageData") == null) { // var canvas = document.createElement("canvas"); // canvas.width = img.width; // canvas.height = img.height; // var ctx = canvas.getContext("2d"); // ctx.drawImage(img, 0, 0); // var data = canvas.toDataURL("image/png"); // data = data.replace(/^data:image\/(png|jpg|gif);base64,/, ""); // // vm.set("settings.imageData", data); // vm.set("settings.imageFileName", "newImage.png"); // saveHistory.resetHistory(); // } // });