@@ 197-216 (lines=20) @@ | ||
194 | iEndButton = 1; |
|
195 | iCurrentPage = 1; |
|
196 | } |
|
197 | else if (iPages < iPageCount) |
|
198 | { |
|
199 | iStartButton = 1; |
|
200 | iEndButton = iPages; |
|
201 | } |
|
202 | else if (iCurrentPage <= iPageCountHalf) |
|
203 | { |
|
204 | iStartButton = 1; |
|
205 | iEndButton = iPageCount; |
|
206 | } |
|
207 | else if (iCurrentPage >= (iPages - iPageCountHalf)) |
|
208 | { |
|
209 | iStartButton = iPages - iPageCount + 1; |
|
210 | iEndButton = iPages; |
|
211 | } |
|
212 | else |
|
213 | { |
|
214 | iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1; |
|
215 | iEndButton = iStartButton + iPageCount - 1; |
|
216 | } |
|
217 | ||
218 | ||
219 | /* Build the dynamic list */ |
@@ 5618-5633 (lines=16) @@ | ||
5615 | return this; |
|
5616 | } |
|
5617 | ||
5618 | if ( data == null && fn == null ) { |
|
5619 | // ( types, fn ) |
|
5620 | fn = selector; |
|
5621 | data = selector = undefined; |
|
5622 | } else if ( fn == null ) { |
|
5623 | if ( typeof selector === "string" ) { |
|
5624 | // ( types, selector, fn ) |
|
5625 | fn = data; |
|
5626 | data = undefined; |
|
5627 | } else { |
|
5628 | // ( types, data, fn ) |
|
5629 | fn = data; |
|
5630 | data = selector; |
|
5631 | selector = undefined; |
|
5632 | } |
|
5633 | } |
|
5634 | if ( fn === false ) { |
|
5635 | fn = returnFalse; |
|
5636 | } else if ( !fn ) { |
@@ 605-615 (lines=11) @@ | ||
602 | hoverWidth = this.el.outerWidth(); |
|
603 | hoverHeight = this.el.outerHeight(); |
|
604 | left = Math.min(Math.max(0, x - hoverWidth / 2), parentWidth - hoverWidth); |
|
605 | if (y != null) { |
|
606 | top = y - hoverHeight - 10; |
|
607 | if (top < 0) { |
|
608 | top = y + 10; |
|
609 | if (top + hoverHeight > parentHeight) { |
|
610 | top = parentHeight / 2 - hoverHeight / 2; |
|
611 | } |
|
612 | } |
|
613 | } else { |
|
614 | top = parentHeight / 2 - hoverHeight / 2; |
|
615 | } |
|
616 | return this.el.css({ |
|
617 | left: left + "px", |
|
618 | top: parseInt(top) + "px" |
@@ 9822-9830 (lines=9) @@ | ||
9819 | l = add * 0.5, |
|
9820 | h, s; |
|
9821 | ||
9822 | if ( min === max ) { |
|
9823 | h = 0; |
|
9824 | } else if ( r === max ) { |
|
9825 | h = ( 60 * ( g - b ) / diff ) + 360; |
|
9826 | } else if ( g === max ) { |
|
9827 | h = ( 60 * ( b - r ) / diff ) + 120; |
|
9828 | } else { |
|
9829 | h = ( 60 * ( r - g ) / diff ) + 240; |
|
9830 | } |
|
9831 | ||
9832 | // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% |
|
9833 | // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) |