fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
So many things get better/are improved, but only things that are to be done or broken...
[wolnelektury.git]
/
apps
/
wolnelektury_core
/
static
/
js
/
picture.js
diff --git
a/apps/wolnelektury_core/static/js/picture.js
b/apps/wolnelektury_core/static/js/picture.js
index
0840aa5
..
052392a
100644
(file)
--- a/
apps/wolnelektury_core/static/js/picture.js
+++ b/
apps/wolnelektury_core/static/js/picture.js
@@
-39,6
+39,7
@@
self.spinner = $("#spinner").progressSpin();
$(original).load(function() {
self.spinner = $("#spinner").progressSpin();
$(original).load(function() {
+ console.log("loaded original");
self._original_loaded = true;
self.spinner.stop();
var cb = self.original_loaded;
self._original_loaded = true;
self.spinner.stop();
var cb = self.original_loaded;
@@
-80,8
+81,8
@@
return self;
},
return self;
},
- natural_size: function() {
- var img = this.element.find('img').get(0);
+ natural_size: function() {
+ var img = this.element.find('img
.original
').get(0);
return [ img.naturalWidth, img.naturalHeight ]
},
return [ img.naturalWidth, img.naturalHeight ]
},
@@
-124,7
+125,7
@@
var new_width = ratio * this.initial_size[0];
var new_height = ratio * this.initial_size[1];
var target = {
var new_width = ratio * this.initial_size[0];
var new_height = ratio * this.initial_size[1];
var target = {
-
//
'width': new_width,
+
'width': new_width,
'left': Math.max(0,
this.initial_position.left
- (new_width - this.initial_size[0])/2),
'left': Math.max(0,
this.initial_position.left
- (new_width - this.initial_size[0])/2),
@@
-136,7
+137,7
@@
this._zoom = level;
this.element.css(target);
this._zoom = level;
this.element.css(target);
- this.element.find(".original").width(new_width);
+
// this.element.animate(target, 1200); // default duration=400
},
// this.element.animate(target, 1200); // default duration=400
},