aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorAnanya Sen2012-02-10 16:05:27 -0800
committerAnanya Sen2012-02-10 16:05:27 -0800
commitf3dc624fa464a79fd8e8cec1ddd16ed2109bda23 (patch)
treef716757dab75d7626297893c7f4aca3596d606de /js/lib
parentc48eeb01bd726895dc577d8b843b2a75883eee07 (diff)
downloadninja-f3dc624fa464a79fd8e8cec1ddd16ed2109bda23.tar.gz
Revert "Merge from /joseeight/ninja-internal/tree/FileIO"
This reverts commit c48eeb01bd726895dc577d8b843b2a75883eee07. Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/lib')
-rwxr-xr-xjs/lib/NJUtils.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js
index 8daafa42..74039e64 100755
--- a/js/lib/NJUtils.js
+++ b/js/lib/NJUtils.js
@@ -183,27 +183,6 @@ exports.NJUtils = Object.create(Object.prototype, {
183 183
184 }, 184 },
185 185
186 // Returns the numerical value and unit string from a string.
187 // Useful for element properties.
188 // 100px will return the following array: [100, px]
189 getValueAndUnits: {
190 value: function(input) {
191 var numberValue = parseFloat(input);
192
193 // Ignore all whitespace, digits, negative sign and "." when looking for units label
194 // The units must come after one or more digits
195 var objRegExp = /(\-*\d+\.*\d*)(\s*)(\w*\%*)/;
196 var unitsString = input.replace(objRegExp, "$3");
197 if(unitsString) {
198 var noSpaces = /(\s*)(\S*)(\s*)/;
199 // strip out spaces and convert to lower case
200 var match = (unitsString.replace(noSpaces, "$2")).toLowerCase();
201 }
202
203 return [numberValue, match];
204 }
205 },
206
207 /* ================= Style methods ================= */ 186 /* ================= Style methods ================= */
208 187
209 ///// Get computed height of element 188 ///// Get computed height of element