Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect minify of jquery.iviewer.js #97

Open
hifi55 opened this issue May 18, 2016 · 0 comments
Open

incorrect minify of jquery.iviewer.js #97

hifi55 opened this issue May 18, 2016 · 0 comments

Comments

@hifi55
Copy link

hifi55 commented May 18, 2016

This issue relates to version 0.7.12 (although marked 0.7.11 in the jquery.iviewer.js file).
jquery.iviewer.js in the iviewer-master directory has an incorrect minified version jquery.iviewer.min.js.
The minified version loads an image twice, instead of once as is the case when the non-minified version is used.

You can see this when you change in \iviewer-master\test\index.html

<script type="text/javascript" src="../jquery.iviewer.js" ></script>

to

<script type="text/javascript" src="../jquery.iviewer.min.js" ></script>

Viewing file access in the WebConsole of Firefox developers tools reports

.../iviewer-master/test/jquery.js
.../iviewer-master/test/jqueryui.js
.../iviewer-master/test/jquery.mousewheel.min.js
.../iviewer-master/jquery.iviewer.min.js
.../iviewer-master/jquery.iviewer.css
.../iviewer-master/img/iviewer.zoom_in.gif
.../iviewer-master/img/iviewer.zoom_out.gif
.../iviewer-master/img/iviewer.zoom_zero.gif
.../iviewer-master/img/iviewer.zoom_fit.gif
.../iviewer-master/img/iviewer.rotate_left.png
.../iviewer-master/img/iviewer.rotate_right.png
.../iviewer-master/test/test_image.jpg      <- first loading
.../iviewer-master/test/test_image2.jpg     <- first loading
.../iviewer-master/test/test_image.jpg      <- second loading
.../iviewer-master/test/test_image2.jpg     <- second loading
.../iviewer-master/img/hand.cur

However, when using the non-minified version, it shows:


.../iviewer-master/test/jquery.js
.../iviewer-master/test/jqueryui.js
.../iviewer-master/test/jquery.mousewheel.min.js
.../iviewer-master/jquery.iviewer.js
.../iviewer-master/jquery.iviewer.css
.../iviewer-master/img/iviewer.zoom_in.gif
.../iviewer-master/img/iviewer.zoom_out.gif
.../iviewer-master/img/iviewer.zoom_zero.gif
.../iviewer-master/img/iviewer.zoom_fit.gif
.../iviewer-master/img/iviewer.rotate_left.png
.../iviewer-master/img/iviewer.rotate_right.png
.../iviewer-master/test/test_image.jpg     <- no second loading
.../iviewer-master/test/test_image2.jpg    <- no second loading
.../iviewer-master/img/hand.cur

So what is the original version of the minified file? Without this second loading you'll notice a short 'black-out' if a large image loads and can see the image being resized.

Also, there's an error in jquery.js. This version should be identical to https://code.jquery.com/jquery-1.7.1.min.js, but has a difference at one spot: j.test("Â ") vs. j.test(" ").
Perhaps there are glitches in other files as well?

@hifi55 hifi55 closed this as completed May 18, 2016
@hifi55 hifi55 reopened this May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant