From a3024011a91d3941f81481dd4d600e9684eb0fd4 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 2 Feb 2012 00:11:51 -0800 Subject: upgrading to Montage v0.6 Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/flow-path.js | 46 ++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 26 deletions(-) (limited to 'node_modules/montage/ui/flow-path.js') diff --git a/node_modules/montage/ui/flow-path.js b/node_modules/montage/ui/flow-path.js index 85a6b5a4..ecb1d8fa 100644 --- a/node_modules/montage/ui/flow-path.js +++ b/node_modules/montage/ui/flow-path.js @@ -1,11 +1,5 @@ -/* -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 FlowPath = exports.FlowPath = Montage.create(Montage, { _translateX: { @@ -21,7 +15,7 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this._updatePath(); } }, - + _translateY: { enumerable: false, value: null @@ -49,7 +43,7 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this._updatePath(); } }, - + _rotateX: { enumerable: false, value: null @@ -63,7 +57,7 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this._updatePath(); } }, - + _rotateY: { enumerable: false, value: null @@ -77,7 +71,7 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this._updatePath(); } }, - + _rotateZ: { enumerable: false, value: null @@ -105,7 +99,7 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this._updatePath(); } }, - + _opacity: { enumerable: false, value: null @@ -119,12 +113,12 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this._updatePath(); } }, - + _updatePath: { enumerable: false, value: function () { var path = []; - + if (this._translateX) { path.push("path.translateX="+this._translateX); } @@ -152,21 +146,21 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this.evalPath=path; } }, - + // we should be cautious with this eval, but I wanted to try serializing paths directly - + _evalPath: { enumerable: false, value: null }, - + evalPath: { get: function () { return this._evalPath; }, set: function (value) { var error=false; - + if (typeof value === "string") { try { eval("var func=function(slide){var path={};path.style={};"+value+";return path;}"); @@ -182,10 +176,10 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { this._evalPath = value; } } else { - this._evalPath = value.join(";\r\n")+";"; - eval("var func=function(slide){var path={};path.style={};"+this._evalPath+"return path;}"); + this._evalPath = value.join(";\r\n")+";"; + eval("var func=function(slide){var path={};path.style={};"+this._evalPath+"return path;}"); } - + if (!error) { this.path = { value: func @@ -193,7 +187,7 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { } } }, - + _path: { enumerable: false, value: { @@ -202,14 +196,14 @@ var FlowPath = exports.FlowPath = Montage.create(Montage, { } } }, - + path: { get: function () { return this._path; }, - set: function (value) { + set: function (value) { this._path = value; } } - -}); \ No newline at end of file + +}); -- cgit v1.2.3