aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/snap-2d-record.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 14:35:44 -0700
committerValerio Virgillito2012-07-09 14:35:44 -0700
commit84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch)
tree3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/helper-classes/3D/snap-2d-record.js
parentc0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff)
parent40c6eb2c06b34f65a74d59ef9687251952858bab (diff)
downloadninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts: js/components/gradientpicker.reel/gradientpicker.js js/components/tools-properties/text-properties.reel/text-properties.js js/document/views/base.js js/document/views/design.js js/helper-classes/3D/StageLine.js js/helper-classes/3D/draw-utils.js js/lib/drawing/world.js js/lib/geom/circle.js js/lib/geom/line.js js/lib/geom/rectangle.js js/lib/geom/shape-primitive.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/flag-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/water-material.js js/panels/Materials/materials-library-panel.reel/materials-library-panel.html js/panels/Materials/materials-library-panel.reel/materials-library-panel.js js/panels/Materials/materials-popup.reel/materials-popup.html js/panels/Materials/materials-popup.reel/materials-popup.js js/tools/LineTool.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/helper-classes/3D/snap-2d-record.js')
-rwxr-xr-xjs/helper-classes/3D/snap-2d-record.js84
1 files changed, 42 insertions, 42 deletions
diff --git a/js/helper-classes/3D/snap-2d-record.js b/js/helper-classes/3D/snap-2d-record.js
index 26afaed2..5119ae6f 100755
--- a/js/helper-classes/3D/snap-2d-record.js
+++ b/js/helper-classes/3D/snap-2d-record.js
@@ -36,45 +36,45 @@ var viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils;
36var snapManager = require("js/helper-classes/3D/snap-manager"); 36var snapManager = require("js/helper-classes/3D/snap-manager");
37var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype, 37var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype,
38{ 38{
39 /////////////////////////////////////////////////////////////////////// 39 ///////////////////////////////////////////////////////////////////////
40 // Constant definitions 40 // Constant definitions
41 /////////////////////////////////////////////////////////////////////// 41 ///////////////////////////////////////////////////////////////////////
42 42
43 /////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////
44 // Instance variables 44 // Instance variables
45 /////////////////////////////////////////////////////////////////////// 45 ///////////////////////////////////////////////////////////////////////
46 _elt : { value: null , writable: true}, // the four boundary points for the element in global screen space 46 _elt : { value: null , writable: true}, // the four boundary points for the element in global screen space
47 _screenPtArray : { value: null , writable: true}, // snap point in global screen space 47 _screenPtArray : { value: null , writable: true}, // snap point in global screen space
48 _alignPtArray : { value: null , writable: true}, // points for snap-align. Kept in working plane space 48 _alignPtArray : { value: null , writable: true}, // points for snap-align. Kept in working plane space
49 49
50 _localToGlobalMat : { value: null, writable: true }, 50 _localToGlobalMat : { value: null, writable: true },
51 _globalToLocalMat : { value: null, writable: true }, 51 _globalToLocalMat : { value: null, writable: true },
52 52
53 // indices to the extremal align points 53 // indices to the extremal align points
54 _xMinArray : { value: [], writable: true }, 54 _xMinArray : { value: [], writable: true },
55 _xMaxArray : { value: [] , writable: true}, 55 _xMaxArray : { value: [] , writable: true},
56 _yMinArray : { value: [] , writable: true}, 56 _yMinArray : { value: [] , writable: true},
57 _yMaxArray : { value: [] , writable: true}, 57 _yMaxArray : { value: [] , writable: true},
58 58
59 /////////////////////////////////////////////////////////////////////// 59 ///////////////////////////////////////////////////////////////////////
60 // Property accessors 60 // Property accessors
61 /////////////////////////////////////////////////////////////////////// 61 ///////////////////////////////////////////////////////////////////////
62 getElement: { value: function() { return this._elt; }}, 62 getElement: { value: function() { return this._elt; }},
63 setElement: { value: function() { this._elt = e; }}, 63 setElement: { value: function() { this._elt = e; }},
64 64
65 getScreenPointArray: { value: function() { return this._screenPtArray; }}, 65 getScreenPointArray: { value: function() { return this._screenPtArray; }},
66 getAlignPointArray: { value: function() { return this._alignPtArray; }}, 66 getAlignPointArray: { value: function() { return this._alignPtArray; }},
67 67
68 getLocalToGlobalMatrix: { value: function() { return this._localToGlobalMat; }}, 68 getLocalToGlobalMatrix: { value: function() { return this._localToGlobalMat; }},
69 setLocalToGlobalMatrix: { value: function() { this._localToGlobalMat = l2g.slice(0); }}, 69 setLocalToGlobalMatrix: { value: function() { this._localToGlobalMat = l2g.slice(0); }},
70 70
71 getGlobalToLocalMatrix: { value: function() { return this._globalToLocalMat; }}, 71 getGlobalToLocalMatrix: { value: function() { return this._globalToLocalMat; }},
72 setGlobalToLocalMatrix: { value: function() { this._globalToLocalMat = g2l.slice(0); }}, 72 setGlobalToLocalMatrix: { value: function() { this._globalToLocalMat = g2l.slice(0); }},
73 73
74 /////////////////////////////////////////////////////////////////////// 74 ///////////////////////////////////////////////////////////////////////
75 // Methods 75 // Methods
76 /////////////////////////////////////////////////////////////////////// 76 ///////////////////////////////////////////////////////////////////////
77 init: { 77 init: {
78 value: function( elt ) { 78 value: function( elt ) {
79 this._elt = elt; 79 this._elt = elt;
80 var bounds = viewUtils.getElementViewBounds3D( elt ); 80 var bounds = viewUtils.getElementViewBounds3D( elt );
@@ -112,7 +112,7 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype,
112 } 112 }
113 }, 113 },
114 114
115 initAlignExtremalPoints: { 115 initAlignExtremalPoints: {
116 value: function() { 116 value: function() {
117 var xMinArray = [0], xMaxArray = [0], 117 var xMinArray = [0], xMaxArray = [0],
118 yMinArray = [0], yMaxArray = [0]; 118 yMinArray = [0], yMaxArray = [0];
@@ -135,7 +135,7 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype,
135 } 135 }
136 }, 136 },
137 137
138 getScreenPoint: { 138 getScreenPoint: {
139 value: function( index ) { 139 value: function( index ) {
140 var rtnPt; 140 var rtnPt;
141 if ((index >= 0) && (index < 4) && (this._screenPtArray != null)) 141 if ((index >= 0) && (index < 4) && (this._screenPtArray != null))
@@ -145,7 +145,7 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype,
145 } 145 }
146 }, 146 },
147 147
148 addAlignPoint: { 148 addAlignPoint: {
149 value: function( pt ) { 149 value: function( pt ) {
150 this._alignPtArray.push( pt ); 150 this._alignPtArray.push( pt );
151 } 151 }