Closed paazmaya closed 12 years ago
The line is correct. It will set o
and return the value from options.borderWidth
so the if
can check it. It's the same as:
o = options.borderWidth
if (o)
$handles.css({ borderWidth: o, borderStyle: 'solid' });
Would it make sense for readability to change the line to the one you commented in the reply?
Perhaps, but I think that's subjective. I suspect odyniec (the author) likes the style he's used. It would be up to him to change it.
Actually, I'm using constructs like this to save a few bytes here and there (this can make a significant difference when the code gets packed/minified). I usually prefer cleaner code, like the one that @AaronLasseigne demonstrated :-)
Line 921 has the following line:
if (o = options.borderWidth)
Perhaps it should be == instead of =