Commit 8a9aaf00 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

minor

parent 3216e7e7
...@@ -591,6 +591,9 @@ function append_hidden_div(index){ ...@@ -591,6 +591,9 @@ function append_hidden_div(index){
el = $("<div>",{ el = $("<div>",{
id: "div_"+index id: "div_"+index
}).css({ }).css({
/*position:"absolute",
top: "1000px",
left: index*200+"px",*/
display: "none" display: "none"
}); });
......
...@@ -98,16 +98,19 @@ ...@@ -98,16 +98,19 @@
TX = Date.now(); TX = Date.now();
T0 = Date.now(); T0 = Date.now();
http.responseType = "blob"; http.responseType = "blob";
http.onload = function(e) { http.onload = function(e) {
console.log("#"+elem.attr("id")+", file load time: "+(Date.now()-TX)/1000+" s"); console.log("#"+elem.attr("id")+", file load time: "+(Date.now()-TX)/1000+" s");
TX = Date.now(); TX = Date.now();
if (this.status === 200) { if (this.status === 200) {
var heavyImage = new Image(); var heavyImage = new Image();
heavyImage.onload = function(){ heavyImage.onload = function(){
EXIF.getData(this, function() { EXIF.getData(this, function() {
//update canvas size //update canvas size
canvas.attr("width",this.width); canvas.attr("width",this.width);
...@@ -118,10 +121,12 @@ ...@@ -118,10 +121,12 @@
canvas.drawImage({ canvas.drawImage({
x:0, y:0, x:0, y:0,
source: this, source: this,
//source: heavyImage,
load: redraw, load: redraw,
fromCenter: false fromCenter: false
}); });
}); });
}; };
heavyImage.src = URL.createObjectURL(http.response); heavyImage.src = URL.createObjectURL(http.response);
} }
...@@ -133,6 +138,9 @@ ...@@ -133,6 +138,9 @@
function redraw(){ function redraw(){
//for debugging
//IMAGE_FORMAT="JPEG";
$(this).draw({ $(this).draw({
fn: function(ctx){ fn: function(ctx){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment