diff options
author | Jose Antonio Marquez | 2012-07-23 16:59:28 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-07-23 17:01:22 -0700 |
commit | fb6b9cb1f7ee29bb2e8d7178479717f650d0b7b5 (patch) | |
tree | a5e0561f4753abfce953a2fdfb324a8b21206c99 /js | |
parent | faa78ac6b0f9944dd406bed3c8170714ca02e3f9 (diff) | |
download | ninja-fb6b9cb1f7ee29bb2e8d7178479717f650d0b7b5.tar.gz |
Fix: Adding a check for element w/h/t/l
This fixes an issue with elements with no set width, height, top, left values from being handling through the PI. Currently those values will default to zero, a secondary fix will address this to show no value in PI and other panels.
Diffstat (limited to 'js')
-rwxr-xr-x | js/lib/NJUtils.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index cfb7ef07..bca9b05b 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js | |||
@@ -241,6 +241,7 @@ exports.NJUtils = Montage.create(Component, { | |||
241 | // 100px will return the following array: [100, px] | 241 | // 100px will return the following array: [100, px] |
242 | getValueAndUnits: { | 242 | getValueAndUnits: { |
243 | value: function(input) { | 243 | value: function(input) { |
244 | if (!input) return [null, null]; | ||
244 | var numberValue = parseFloat(input); | 245 | var numberValue = parseFloat(input); |
245 | 246 | ||
246 | // Ignore all whitespace, digits, negative sign and "." when looking for units label | 247 | // Ignore all whitespace, digits, negative sign and "." when looking for units label |