aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/flow-path-linear.js
diff options
context:
space:
mode:
authorJonathan Duran2012-05-09 09:58:27 -0700
committerJonathan Duran2012-05-09 09:58:27 -0700
commit48a2a800155fd2d608fb7191c0180cd8f625cd44 (patch)
tree899f9cf1b09a01bc073f92ab498236aed80b38ec /node_modules/montage/ui/flow-path-linear.js
parent2ea8a62835f4c20efff2623306e7205e6f5bf0ba (diff)
parentd220c02e246b30509b28a47fa04916ca2b8122e4 (diff)
downloadninja-48a2a800155fd2d608fb7191c0180cd8f625cd44.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts: js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/flow-path-linear.js')
-rw-r--r--node_modules/montage/ui/flow-path-linear.js83
1 files changed, 83 insertions, 0 deletions
diff --git a/node_modules/montage/ui/flow-path-linear.js b/node_modules/montage/ui/flow-path-linear.js
new file mode 100644
index 00000000..9bf83279
--- /dev/null
+++ b/node_modules/montage/ui/flow-path-linear.js
@@ -0,0 +1,83 @@
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
7var Montage = require("montage").Montage;
8
9var FlowPathLinear = exports.FlowPathLinear = Montage.create(Montage, {
10
11 _variable: {
12 enumerable: false,
13 value: "time"
14 },
15
16 variable: {
17 get: function () {
18 return this._variable;
19 },
20 set: function (value) {
21 switch (value) {
22 case "speed":
23 case "index":
24 this._variable = value;
25 break;
26 default:
27 this._variable = "time";
28 }
29 this._updatePath();
30 }
31 },
32
33 _origin: {
34 enumerable: false,
35 value: 0
36 },
37
38 origin: {
39 get: function () {
40 return this._origin;
41 },
42 set: function (value) {
43 this._origin = value;
44 this._updatePath();
45 }
46 },
47
48 _multiplier: {
49 enumerable: false,
50 value: 1
51 },
52
53 multiplier: {
54 get: function () {
55 return this._multiplier;
56 },
57 set: function (value) {
58 this._multiplier = value;
59 this._updatePath();
60 }
61 },
62
63 _path: {
64 enumerable: false,
65 value: "0"
66 },
67
68 path: {
69 get: function () {
70 return this._path;
71 },
72 set: function (value) {
73 this._path = value;
74 }
75 },
76
77 _updatePath: {
78 enumerable: false,
79 value: function () {
80 this.path = "slide."+this._variable+"*("+this._multiplier+")-("+this._origin+")";
81 }
82 }
83});