Index: trunk/extensions/ProofreadPage/proofread.js |
— | — | @@ -656,10 +656,14 @@ |
657 | 657 | |
658 | 658 | |
659 | 659 | |
| 660 | +function pr_load_image() { |
| 661 | + pr_container.innerHTML = "<img id=\"ProofReadImage\" src=\"" |
| 662 | + + escapeQuotesHTML(proofreadPageViewURL) |
| 663 | + + "\" width=\"" + img_width + "\" />"; |
| 664 | +} |
660 | 665 | |
661 | 666 | |
662 | 667 | |
663 | | - |
664 | 668 | function pr_setup() { |
665 | 669 | |
666 | 670 | self.pr_horiz = (self.proofreadpage_default_layout=='horizontal'); |
— | — | @@ -703,14 +707,12 @@ |
704 | 708 | } else { |
705 | 709 | //prevent the container from being resized once the image is downloaded. |
706 | 710 | img_width = pr_horiz?0:parseInt(pr_width/2-70)-20; |
707 | | - pr_container.innerHTML = "<img id=\"ProofReadImage\" src=\"" |
708 | | - + escapeQuotesHTML(proofreadPageViewURL) |
709 | | - + "\" width=\"" + img_width + "\" />"; |
710 | 711 | pr_container.onmousedown = pr_grab; |
711 | 712 | pr_container.onmousemove = pr_move; |
712 | 713 | if (pr_container.addEventListener) |
713 | 714 | pr_container.addEventListener('DOMMouseScroll', pr_zoom_wheel, false); |
714 | 715 | pr_container.onmousewheel = pr_zoom_wheel;//IE,Opera. |
| 716 | + hookEvent( 'load', pr_load_image ); |
715 | 717 | } |
716 | 718 | |
717 | 719 | table.setAttribute("id", "textBoxTable"); |