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-cubic.js | 115 +++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 node_modules/montage/ui/flow-path-cubic.js (limited to 'node_modules/montage/ui/flow-path-cubic.js') diff --git a/node_modules/montage/ui/flow-path-cubic.js b/node_modules/montage/ui/flow-path-cubic.js new file mode 100644 index 00000000..989b19ad --- /dev/null +++ b/node_modules/montage/ui/flow-path-cubic.js @@ -0,0 +1,115 @@ +/* +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 FlowPathCubic = exports.FlowPathCubic = 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(); + } + }, + + _a: { + enumerable: false, + value: 0 + }, + + a: { + get: function () { + return this._a; + }, + set: function (value) { + this._a = value; + this._updatePath(); + } + }, + + _b: { + enumerable: false, + value: 0 + }, + + b: { + get: function () { + return this._b; + }, + set: function (value) { + this._b = value; + this._updatePath(); + } + }, + + _c: { + enumerable: false, + value: 0 + }, + + c: { + get: function () { + return this._c; + }, + set: function (value) { + this._c = value; + this._updatePath(); + } + }, + + _d: { + enumerable: false, + value: 0 + }, + + d: { + get: function () { + return this._d; + }, + set: function (value) { + this._d = 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 () { + var s = "slide."+this._variable; + + this.path = "("+this._a+")*"+s+"*"+s+"*"+s+"+("+this._b+")*"+s+"*"+s+"+("+this._c+")*"+s+"+("+this._d+")"; + } + } +}); \ No newline at end of file -- cgit v1.2.3