imazen / studiojs

[Deprecated] A set of jQuery plugins that compose a flexible, web-based image editing studio.
92 stars 29 forks source link

two bugs in ImageResizer.js found ! #12

Closed AvenSun closed 4 years ago

AvenSun commented 10 years ago

suppose I have run ImageResizer under this domain

http://localhost:804/studio.html

the content of studin.html is just like the page below displays

https://github.com/imazen/studiojs/blob/master/tutorial.md#6-youre-done

Everything goes well when the editingServer is not set or keeping null

after setting the editingServer http://localhost:804/ , then refresh the page

http://localhost:804/studio.html it stoped with the javascript error

"ir.Utils.joinPath is not a function" in file ImageResizer.js ,

after some debug , I found there's no function named joinPath but joinPaths ,

I modified this misspelled error and refresh the page again

one new javascript error occurs "relatve is not defined" in file ImageResizer.js

ir.Utils.joinPaths = function (base, relative) { if (base.charAt(base.length - 1) == '/') base = base.substr(0,base.length -1); return base + ((relatve.charAt(0) != '/') ? '/' : '') + relative; }

I found "relatve.charAt(0)" was misspelled after checked the code snippet.

after correcting these two misspelled error, Resizer works well again!

lilith commented 8 years ago

Thank you for reporting this! Could you submit a pull request with your changes?