From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/flow-path-linear.js | 83 +++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 node_modules/montage/ui/flow-path-linear.js (limited to 'node_modules/montage/ui/flow-path-linear.js') 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..fa23d10b --- /dev/null +++ b/node_modules/montage/ui/flow-path-linear.js @@ -0,0 +1,83 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +var Montage = require("montage").Montage; + +var FlowPathLinear = exports.FlowPathLinear = Montage.create(Montage, { + + _variable: { + enumerable: false, + value: "time" + }, + + variable: { + get: function () { + return this._variable; + }, + set: function (value) { + switch (value) { + case "speed": + case "index": + this._variable = value; + break; + default: + this._variable = "time"; + } + this._updatePath(); + } + }, + + _origin: { + enumerable: false, + value: 0 + }, + + origin: { + get: function () { + return this._origin; + }, + set: function (value) { + this._origin = value; + this._updatePath(); + } + }, + + _multiplier: { + enumerable: false, + value: 1 + }, + + multiplier: { + get: function () { + return this._multiplier; + }, + set: function (value) { + this._multiplier = value; + this._updatePath(); + } + }, + + _path: { + enumerable: false, + value: "0" + }, + + path: { + get: function () { + return this._path; + }, + set: function (value) { + this._path = value; + } + }, + + _updatePath: { + enumerable: false, + value: function () { + this.path = "slide."+this._variable+"*("+this._multiplier+")-("+this._origin+")"; + } + } +}); \ No newline at end of file -- cgit v1.2.3