aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/BrushTool.js2
-rwxr-xr-xjs/tools/EyedropperTool.js22
-rwxr-xr-xjs/tools/FillTool.js14
-rwxr-xr-xjs/tools/InkBottleTool.js12
-rwxr-xr-xjs/tools/LineTool.js24
-rwxr-xr-xjs/tools/OvalTool.js16
-rwxr-xr-xjs/tools/PanTool.js628
-rwxr-xr-xjs/tools/PenTool.js2
-rwxr-xr-xjs/tools/RectTool.js6
-rwxr-xr-xjs/tools/Rotate3DToolBase.js316
-rwxr-xr-xjs/tools/RotateStage3DTool.js20
-rwxr-xr-xjs/tools/SelectionTool.js70
-rwxr-xr-xjs/tools/ShapeTool.js178
-rwxr-xr-xjs/tools/ToolBase.js2
-rwxr-xr-xjs/tools/Translate3DToolBase.js426
-rwxr-xr-xjs/tools/TranslateObject3DTool.js80
-rwxr-xr-xjs/tools/ZoomTool.js314
-rwxr-xr-xjs/tools/drawing-tool-base.js850
-rwxr-xr-xjs/tools/drawing-tool.js4
-rwxr-xr-xjs/tools/modifier-tool-base.js774
20 files changed, 1880 insertions, 1880 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js
index 8861d226..d8a2fde0 100644
--- a/js/tools/BrushTool.js
+++ b/js/tools/BrushTool.js
@@ -29,7 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
29</copyright> */ 29</copyright> */
30 30
31var ShapeTool = require("js/tools/ShapeTool").ShapeTool; 31var ShapeTool = require("js/tools/ShapeTool").ShapeTool;
32var ShapesController = require("js/controllers/elements/shapes-controller").ShapesController; 32var ShapesController = require("js/controllers/elements/shapes-controller").ShapesController;
33var DrawingToolBase = require("js/tools/drawing-tool-base").DrawingToolBase; 33var DrawingToolBase = require("js/tools/drawing-tool-base").DrawingToolBase;
34var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager; 34var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager;
35var Montage = require("montage/core/core").Montage; 35var Montage = require("montage/core/core").Montage;
diff --git a/js/tools/EyedropperTool.js b/js/tools/EyedropperTool.js
index e9831d71..452c46d1 100755
--- a/js/tools/EyedropperTool.js
+++ b/js/tools/EyedropperTool.js
@@ -49,20 +49,20 @@ exports.EyedropperTool = Montage.create(toolBase, {
49 49
50 Configure: { 50 Configure: {
51 value: function ( doActivate ) 51 value: function ( doActivate )
52 { 52 {
53 if (doActivate) 53 if (doActivate)
54 { 54 {
55 NJevent("enableStageMove"); 55 NJevent("enableStageMove");
56 } 56 }
57 else 57 else
58 { 58 {
59 NJevent("disableStageMove"); 59 NJevent("disableStageMove");
60 this._deleteImageDataCanvas(); 60 this._deleteImageDataCanvas();
61 this._isMouseDown = false; 61 this._isMouseDown = false;
62 this._elementUnderMouse = null; 62 this._elementUnderMouse = null;
63 this._previousColor = null; 63 this._previousColor = null;
64 this._color = null; 64 this._color = null;
65 } 65 }
66 } 66 }
67 }, 67 },
68 68
@@ -78,7 +78,7 @@ exports.EyedropperTool = Montage.create(toolBase, {
78 78
79 HandleMouseMove: { 79 HandleMouseMove: {
80 value : function (event) 80 value : function (event)
81 { 81 {
82 if(this._escape) 82 if(this._escape)
83 { 83 {
84 this._isMouseDown = false; 84 this._isMouseDown = false;
@@ -90,12 +90,12 @@ exports.EyedropperTool = Montage.create(toolBase, {
90 { 90 {
91 this._updateColorFromPoint(event); 91 this._updateColorFromPoint(event);
92 } 92 }
93 } 93 }
94 }, 94 },
95 95
96 HandleLeftButtonUp: { 96 HandleLeftButtonUp: {
97 value : function (event) { 97 value : function (event) {
98 { 98 {
99 this._isMouseDown = false; 99 this._isMouseDown = false;
100 100
101 if(this._escape) 101 if(this._escape)
diff --git a/js/tools/FillTool.js b/js/tools/FillTool.js
index d779c655..b6f244e1 100755
--- a/js/tools/FillTool.js
+++ b/js/tools/FillTool.js
@@ -40,13 +40,13 @@ var Montage = require("montage/core/core").Montage,
40 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController; 40 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController;
41 41
42exports.FillTool = Montage.create(ModifierToolBase, { 42exports.FillTool = Montage.create(ModifierToolBase, {
43 _canSnap: { value: false }, 43 _canSnap: { value: false },
44 _canColor: { value: true }, 44 _canColor: { value: true },
45 _targetedElement: { value: null }, 45 _targetedElement: { value: null },
46 46
47 HandleMouseMove: { 47 HandleMouseMove: {
48 value : function (event) 48 value : function (event)
49 { 49 {
50 var obj = this.application.ninja.stage.getElement(event, true); 50 var obj = this.application.ninja.stage.getElement(event, true);
51 var cursor = "url('images/cursors/fill.png') 14 14, default"; 51 var cursor = "url('images/cursors/fill.png') 14 14, default";
52 var canColor = true; 52 var canColor = true;
@@ -78,13 +78,13 @@ exports.FillTool = Montage.create(ModifierToolBase, {
78 } 78 }
79 this.application.ninja.stage.drawingCanvas.style.cursor = cursor; 79 this.application.ninja.stage.drawingCanvas.style.cursor = cursor;
80 this._canColor = canColor; 80 this._canColor = canColor;
81 } 81 }
82 }, 82 },
83 83
84 HandleLeftButtonUp: { 84 HandleLeftButtonUp: {
85 value : function () { 85 value : function () {
86 //if(this._isDrawing) 86 //if(this._isDrawing)
87 { 87 {
88 this.application.ninja.stage.clearDrawingCanvas(); 88 this.application.ninja.stage.clearDrawingCanvas();
89 this._hasDraw = false; 89 this._hasDraw = false;
90 this._isDrawing = false; 90 this._isDrawing = false;
diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js
index 3762641b..d8f06204 100755
--- a/js/tools/InkBottleTool.js
+++ b/js/tools/InkBottleTool.js
@@ -33,13 +33,13 @@ var Montage = require("montage/core/core").Montage,
33 ElementsMediator = require("js/mediators/element-mediator").ElementMediator; 33 ElementsMediator = require("js/mediators/element-mediator").ElementMediator;
34 34
35exports.InkBottleTool = Montage.create(ModifierToolBase, { 35exports.InkBottleTool = Montage.create(ModifierToolBase, {
36 _canSnap: { value: false }, 36 _canSnap: { value: false },
37 _canColor: { value: true }, 37 _canColor: { value: true },
38 _targetedElement: { value: null }, 38 _targetedElement: { value: null },
39 39
40 HandleMouseMove: { 40 HandleMouseMove: {
41 value : function (event) 41 value : function (event)
42 { 42 {
43 var obj = this.application.ninja.stage.getElement(event, true); 43 var obj = this.application.ninja.stage.getElement(event, true);
44 var cursor = "url('images/cursors/ink.png') 6 11, default"; 44 var cursor = "url('images/cursors/ink.png') 6 11, default";
45 var canColor = true; 45 var canColor = true;
@@ -72,13 +72,13 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, {
72 } 72 }
73 this.application.ninja.stage.drawingCanvas.style.cursor = cursor; 73 this.application.ninja.stage.drawingCanvas.style.cursor = cursor;
74 this._canColor = canColor; 74 this._canColor = canColor;
75 } 75 }
76 }, 76 },
77 77
78 HandleLeftButtonUp: { 78 HandleLeftButtonUp: {
79 value : function () { 79 value : function () {
80 //if(this._isDrawing) 80 //if(this._isDrawing)
81 { 81 {
82 this.application.ninja.stage.clearDrawingCanvas(); 82 this.application.ninja.stage.clearDrawingCanvas();
83 this._hasDraw = false; 83 this._hasDraw = false;
84 this._isDrawing = false; 84 this._isDrawing = false;
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 89f33a16..b0681af7 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -28,23 +28,23 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28POSSIBILITY OF SUCH DAMAGE. 28POSSIBILITY OF SUCH DAMAGE.
29</copyright> */ 29</copyright> */
30 30
31var Montage = require("montage/core/core").Montage, 31var Montage = require("montage/core/core").Montage,
32 ShapeTool = require("js/tools/ShapeTool").ShapeTool, 32 ShapeTool = require("js/tools/ShapeTool").ShapeTool,
33 DrawingToolBase = require("js/tools/drawing-tool-base").DrawingToolBase, 33 DrawingToolBase = require("js/tools/drawing-tool-base").DrawingToolBase,
34 NJUtils = require("js/lib/NJUtils").NJUtils, 34 NJUtils = require("js/lib/NJUtils").NJUtils,
35 TagTool = require("js/tools/TagTool").TagTool, 35 TagTool = require("js/tools/TagTool").TagTool,
36 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController, 36 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController,
37 ShapeModel = require("js/models/shape-model").ShapeModel; 37 ShapeModel = require("js/models/shape-model").ShapeModel;
38 38
39var Line = require("js/lib/geom/line").Line; 39var Line = require("js/lib/geom/line").Line;
40var MaterialsModel = require("js/models/materials-model").MaterialsModel; 40var MaterialsModel = require("js/models/materials-model").MaterialsModel;
41 41
42exports.LineTool = Montage.create(ShapeTool, { 42exports.LineTool = Montage.create(ShapeTool, {
43 _toolID: { value: "lineTool" }, 43 _toolID: { value: "lineTool" },
44 _imageID: { value: "lineToolImg" }, 44 _imageID: { value: "lineToolImg" },
45 _toolImageClass: { value: "lineToolUp" }, 45 _toolImageClass: { value: "lineToolUp" },
46 _selectedToolImageClass: { value: "lineToolDown" }, 46 _selectedToolImageClass: { value: "lineToolDown" },
47 _toolTipText: { value: "Line Tool (L)" }, 47 _toolTipText: { value: "Line Tool (L)" },
48 48
49 _tmpDrawIndex : { value : 1, writable:true}, 49 _tmpDrawIndex : { value : 1, writable:true},
50 50
@@ -174,9 +174,9 @@ exports.LineTool = Montage.create(ShapeTool, {
174 dx, 174 dx,
175 dy; 175 dy;
176 176
177 if (hitRec0 && hitRec1) { 177 if (hitRec0 && hitRec1) {
178 var p0 = hitRec0.getLocalPoint(), 178 var p0 = hitRec0.getLocalPoint(),
179 p1 = hitRec1.getLocalPoint(); 179 p1 = hitRec1.getLocalPoint();
180