(position)
| 63 | var position; |
| 64 | |
| 65 | function get_position(position) { |
| 66 | if (typeof position === 'number') { |
| 67 | return position; |
| 68 | } else if (typeof position === 'string') { |
| 69 | var match = position.match(/^([0-9]+)(px|%)$/); |
| 70 | if (match) { |
| 71 | if (match[2] == 'px') { |
| 72 | return +match[1]; |
| 73 | } else { |
| 74 | if (settings.orientation == 'vertical') { |
| 75 | return (width * +match[1]) / 100; |
| 76 | } else if (settings.orientation == 'horizontal') { |
| 77 | return (height * +match[1]) / 100; |
| 78 | } |
| 79 | } |
| 80 | } else { |
| 81 | //throw position + ' is invalid value'; |
| 82 | } |
| 83 | } else { |
| 84 | //throw 'position have invalid type'; |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | var self = $.extend(this, { |
| 89 | refresh: function() { |
no outgoing calls
no test coverage detected