gnusocialphotos.js 793 B

1234567891011121314151617181920212223242526272829
  1. function increasePhotoSize() {
  2. $('.photoingallery, .albumingallery').each(function(index) {
  3. this.height *= 1.1;
  4. this.width *= 1.1;
  5. });
  6. return false;
  7. }
  8. function decreasePhotoSize() {
  9. $('.photoingallery, .albumingallery').each(function(index) {
  10. this.height /= 1.1;
  11. this.width /= 1.1;
  12. });
  13. return false;
  14. }
  15. function scalePhotosToSize(size) {
  16. $('.photoingallery, .albumingallery').each(function(index) {
  17. if(this.height > this.width) {
  18. this.width = this.width*size/this.height;
  19. this.height = size;
  20. }
  21. else {
  22. this.height = this.height*size/this.width;
  23. this.width = size;
  24. }
  25. });
  26. return false;
  27. }