diff options
author | Jonathan Duran | 2012-05-31 08:54:48 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-31 08:54:48 -0700 |
commit | f297093b5bfa62c9832829751a12f0e556bb5cc0 (patch) | |
tree | 6e04cdf142cb1b36e2197970c9dc2141017a2be7 /js/components/converter/string-value-converter.js | |
parent | 9253e2ce98d748edd8c3929f113a597923960387 (diff) | |
parent | d49c909cff7f0c5e5d0b127ad84a2fefc6677dc6 (diff) | |
download | ninja-f297093b5bfa62c9832829751a12f0e556bb5cc0.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/panels/Timeline/Layer.reel/Layer.js
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
js/panels/properties.reel/properties.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/components/converter/string-value-converter.js')
-rw-r--r-- | js/components/converter/string-value-converter.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/components/converter/string-value-converter.js b/js/components/converter/string-value-converter.js new file mode 100644 index 00000000..28d7dd29 --- /dev/null +++ b/js/components/converter/string-value-converter.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | var Montage = require("montage").Montage, | ||
7 | Converter = require("montage/core/converter/converter").Converter, | ||
8 | NJUtils = require("js/lib/NJUtils").NJUtils; | ||
9 | |||
10 | exports.StringValueConverter = Montage.create(Converter, { | ||
11 | |||
12 | // convert fahrenheit to celsius (showing our non-metric heritage here) | ||
13 | convert: { | ||
14 | value: function(value) { | ||
15 | console.log(value); | ||
16 | console.log(parseInt(value)); | ||
17 | return parseInt(value); | ||
18 | } | ||
19 | }, | ||
20 | |||
21 | // revert celsius to fahrenheit | ||
22 | revert: { | ||
23 | value: function(value) { | ||
24 | console.log("revert string to value ", value); | ||
25 | return value; | ||
26 | } | ||
27 | } | ||
28 | |||
29 | }); | ||