1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-26 11:05:31 +03:00

0029015: Testdiff - possibility to visualize image differences by toggling - correction

Javascript code is corrected to not depend on values of URLs of images
This commit is contained in:
abv 2017-08-29 13:51:49 +03:00 committed by bugmaster
parent 024d6f7775
commit 66d61d8a06

View File

@ -2162,10 +2162,10 @@ proc _log_html_diff {file log dir1 dir2 highlight_percent} {
puts $fd "<script type=\"text/javascript\">" puts $fd "<script type=\"text/javascript\">"
puts $fd " function diffimage_toggle(img,url1,url2)" puts $fd " function diffimage_toggle(img,url1,url2)"
puts $fd " {" puts $fd " {"
puts $fd " if (img.src.match(url2)) img.src = url1;" puts $fd " if (img.show2nd) { img.src = url1; img.show2nd = false; }"
puts $fd " else img.src = url2;" puts $fd " else { img.src = url2; img.show2nd = true; }"
puts $fd " }" puts $fd " }"
puts $fd " function diffimage_reset(img,url) { img.src = url; }" puts $fd " function diffimage_reset(img,url) { img.src = url; img.show2nd = true; }"
puts $fd "</script>" puts $fd "</script>"
puts $fd "" puts $fd ""