diff options
author | Valerio Virgillito | 2012-02-02 00:11:51 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-02 00:11:51 -0800 |
commit | 5a305ec44b2bd5198a248357439aae8ebbd75fee (patch) | |
tree | ec3b756beab7105841353ef79d4e8059b2b6a91c /node_modules/montage/ui/flow-path-sigmoid.js | |
parent | dbe9c7705860fb3551321e23e7eab763f622241c (diff) | |
download | ninja-5a305ec44b2bd5198a248357439aae8ebbd75fee.tar.gz |
upgrading to Montage v0.6
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/flow-path-sigmoid.js')
-rw-r--r-- | node_modules/montage/ui/flow-path-sigmoid.js | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/node_modules/montage/ui/flow-path-sigmoid.js b/node_modules/montage/ui/flow-path-sigmoid.js index 57cc9662..2e776b5a 100644 --- a/node_modules/montage/ui/flow-path-sigmoid.js +++ b/node_modules/montage/ui/flow-path-sigmoid.js | |||
@@ -1,18 +1,12 @@ | |||
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 | |||
7 | var Montage = require("montage").Montage; | 1 | var Montage = require("montage").Montage; |
8 | 2 | ||
9 | var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | 3 | var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { |
10 | 4 | ||
11 | _variable: { | 5 | _variable: { |
12 | enumerable: false, | 6 | enumerable: false, |
13 | value: "time" | 7 | value: "time" |
14 | }, | 8 | }, |
15 | 9 | ||
16 | variable: { | 10 | variable: { |
17 | get: function () { | 11 | get: function () { |
18 | return this._variable; | 12 | return this._variable; |
@@ -29,12 +23,12 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
29 | this._updatePath(); | 23 | this._updatePath(); |
30 | } | 24 | } |
31 | }, | 25 | }, |
32 | 26 | ||
33 | _smoothness: { | 27 | _smoothness: { |
34 | enumerable: false, | 28 | enumerable: false, |
35 | value: 0 | 29 | value: 0 |
36 | }, | 30 | }, |
37 | 31 | ||
38 | smoothness: { | 32 | smoothness: { |
39 | get: function () { | 33 | get: function () { |
40 | return this._smoothness; | 34 | return this._smoothness; |
@@ -49,7 +43,7 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
49 | enumerable: false, | 43 | enumerable: false, |
50 | value: 0 | 44 | value: 0 |
51 | }, | 45 | }, |
52 | 46 | ||
53 | scale: { | 47 | scale: { |
54 | get: function () { | 48 | get: function () { |
55 | return this._scale; | 49 | return this._scale; |
@@ -64,7 +58,7 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
64 | enumerable: false, | 58 | enumerable: false, |
65 | value: 0 | 59 | value: 0 |
66 | }, | 60 | }, |
67 | 61 | ||
68 | width: { | 62 | width: { |
69 | get: function () { | 63 | get: function () { |
70 | return this._width; | 64 | return this._width; |
@@ -79,7 +73,7 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
79 | enumerable: false, | 73 | enumerable: false, |
80 | value: 0 | 74 | value: 0 |
81 | }, | 75 | }, |
82 | 76 | ||
83 | origin: { | 77 | origin: { |
84 | get: function () { | 78 | get: function () { |
85 | return this._origin; | 79 | return this._origin; |
@@ -89,12 +83,12 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
89 | this._updatePath(); | 83 | this._updatePath(); |
90 | } | 84 | } |
91 | }, | 85 | }, |
92 | 86 | ||
93 | _sigmoidCenter: { | 87 | _sigmoidCenter: { |
94 | enumerable: false, | 88 | enumerable: false, |
95 | value: 0 | 89 | value: 0 |
96 | }, | 90 | }, |
97 | 91 | ||
98 | sigmoidCenter: { | 92 | sigmoidCenter: { |
99 | get: function () { | 93 | get: function () { |
100 | return this._sigmoidCenter; | 94 | return this._sigmoidCenter; |
@@ -104,12 +98,12 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
104 | this._updatePath(); | 98 | this._updatePath(); |
105 | } | 99 | } |
106 | }, | 100 | }, |
107 | 101 | ||
108 | _slope: { | 102 | _slope: { |
109 | enumerable: false, | 103 | enumerable: false, |
110 | value: 1 | 104 | value: 1 |
111 | }, | 105 | }, |
112 | 106 | ||
113 | slope: { | 107 | slope: { |
114 | get: function () { | 108 | get: function () { |
115 | return this._slope; | 109 | return this._slope; |
@@ -119,12 +113,12 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
119 | this._updatePath(); | 113 | this._updatePath(); |
120 | } | 114 | } |
121 | }, | 115 | }, |
122 | 116 | ||
123 | _path: { | 117 | _path: { |
124 | enumerable: false, | 118 | enumerable: false, |
125 | value: "0" | 119 | value: "0" |
126 | }, | 120 | }, |
127 | 121 | ||
128 | path: { | 122 | path: { |
129 | get: function () { | 123 | get: function () { |
130 | return this._path; | 124 | return this._path; |
@@ -133,16 +127,16 @@ var FlowPathSigmoid = exports.FlowPathSigmoid = Montage.create(Montage, { | |||
133 | this._path = value; | 127 | this._path = value; |
134 | } | 128 | } |
135 | }, | 129 | }, |
136 | 130 | ||
137 | _updatePath: { | 131 | _updatePath: { |
138 | enumerable: false, | 132 | enumerable: false, |
139 | value: function () { | 133 | value: function () { |
140 | var s = "(slide."+this._variable+"-("+this._origin+"))"; | 134 | var s = "(slide."+this._variable+"-("+this._origin+"))"; |
141 | 135 | ||
142 | 136 | ||
143 | /** parseInt((a/(1+Math.pow(c, -(j*d)))-(a/2)+j*b)*1000)/1000; | 137 | /** parseInt((a/(1+Math.pow(c, -(j*d)))-(a/2)+j*b)*1000)/1000; |
144 | this.path = "parseInt(("+this._a+"/(1+Math.pow("+this._c+", -"+s+"*("+this._d+")))-(("+this._a+")/2)+"+s+"*("+this._b+"))*1000)/1000";*/ | 138 | this.path = "parseInt(("+this._a+"/(1+Math.pow("+this._c+", -"+s+"*("+this._d+")))-(("+this._a+")/2)+"+s+"*("+this._b+"))*1000)/1000";*/ |
145 | this.path = "((("+this._width+")/(1+Math.pow(2, (("+this._sigmoidCenter+")-"+s+")/("+this._smoothness+"))))-("+(this._width/2)+")+"+s+"*("+this._slope+"))*("+this._scale+")"; | 139 | this.path = "((("+this._width+")/(1+Math.pow(2, (("+this._sigmoidCenter+")-"+s+")/("+this._smoothness+"))))-("+(this._width/2)+")+"+s+"*("+this._slope+"))*("+this._scale+")"; |
146 | } | 140 | } |
147 | } | 141 | } |
148 | }); \ No newline at end of file | 142 | }); |