| @@ -80,10 +80,10 @@ | ||
| 80 | 80 | |
| 81 | 81 | var self = this, |
| 82 | 82 | properties = settings.properties, |
| 83 | 83 | new_value = settings.propertyValue, |
| 84 | - // if there is a negative property ... keep it negative | |
| 85 | - is_negative = self.is_negative_property(property_name, properties, selectorText); | |
| 84 | + // if there is a negative property ... keep it negative | |
| 85 | + sign = settings['negative_value'] ? '-' : ''; | |
| 86 | 86 | |
| 87 | 87 | var unit = ''; |
| 88 | 88 | |
| 89 | 89 | if ( typeof this.settings.unit !== 'undefined' ) { |
| @@ -95,34 +95,13 @@ | ||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | if ( typeof window[settings.properties.callback] === "function" ) { |
| 98 | 98 | window[settings.properties.callback](new_value, selectorText, property_name, unit); |
| 99 | + return ''; | |
| 99 | 100 | } |
| 100 | 101 | |
| 101 | - return is_negative + new_value + unit; | |
| 102 | + return sign + new_value + unit; | |
| 102 | 103 | }, |
| 103 | - | |
| 104 | - /** | |
| 105 | - * Check is the current property has a negative selector in our config | |
| 106 | - * if this is true return the sign "-" which will be put in front of the value | |
| 107 | - * @param property | |
| 108 | - * @param current_properties | |
| 109 | - * @param selectorText | |
| 110 | - * @returns {string} | |
| 111 | - */ | |
| 112 | - is_negative_property: function(property, current_properties, selectorText){ | |
| 113 | - if ( current_properties.hasOwnProperty(property) ) { | |
| 114 | - | |
| 115 | - if ( current_properties[property].hasOwnProperty('negative_selector') ) { | |
| 116 | - | |
| 117 | - if (current_properties[property].negative_selector == selectorText) { | |
| 118 | - return '-'; | |
| 119 | - } | |
| 120 | - } | |
| 121 | - } | |
| 122 | - | |
| 123 | - return ''; | |
| 124 | - } | |
| 125 | 104 | }; |
| 126 | 105 | |
| 127 | 106 | // Plugin wrapper |
| 128 | 107 | $.fn[ pluginName ] = function ( options ) { |