gnu-social/plugins/GNUsocialPhotos/res/gnusocialphotos.js

29 lines
793 B
JavaScript
Raw Normal View History

2010-12-29 00:38:50 +09:00
function increasePhotoSize() {
$('.photoingallery, .albumingallery').each(function(index) {
this.height *= 1.1;
this.width *= 1.1;
});
return false;
}
function decreasePhotoSize() {
$('.photoingallery, .albumingallery').each(function(index) {
this.height /= 1.1;
this.width /= 1.1;
});
return false;
}
2010-12-29 10:45:25 +09:00
function scalePhotosToSize(size) {
$('.photoingallery, .albumingallery').each(function(index) {
if(this.height > this.width) {
this.width = this.width*size/this.height;
this.height = size;
}
else {
this.height = this.height*size/this.width;
this.width = size;
}
});
return false;
}