aboutsummaryrefslogtreecommitdiff
path: root/js/tools/PenTool.js
diff options
context:
space:
mode:
authorJonathan Duran2012-04-04 11:21:46 -0700
committerJonathan Duran2012-04-04 11:21:46 -0700
commit04ca16276e73dbd238b42fd898f8b3cccc730f18 (patch)
tree95aee6605f1018550875812166d292554830d7ca /js/tools/PenTool.js
parent61404b1965ffe7011ec86953f853f0954ccc308d (diff)
parenta11ef2eed7049835c8bdfa50a2b893632c46eaa0 (diff)
downloadninja-04ca16276e73dbd238b42fd898f8b3cccc730f18.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts: js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js js/tools/SelectionTool.js Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-xjs/tools/PenTool.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index 779b7f16..4a16a491 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -585,7 +585,7 @@ exports.PenTool = Montage.create(ShapeTool, {
585 var newCanvas = null; 585 var newCanvas = null;
586 newCanvas = NJUtils.makeNJElement("canvas", "Subpath", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); 586 newCanvas = NJUtils.makeNJElement("canvas", "Subpath", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true);
587 var elementModel = TagTool.makeElement(parseInt(w), parseInt(h), planeMat, midPt, newCanvas); 587 var elementModel = TagTool.makeElement(parseInt(w), parseInt(h), planeMat, midPt, newCanvas);
588 ElementMediator.addElement(newCanvas, elementModel.data, true); 588 ElementMediator.addElements(newCanvas, elementModel.data, false);
589 589
590 // create all the GL stuff 590 // create all the GL stuff
591 var world = this.getGLWorld(newCanvas, this._useWebGL);//this.options.use3D);//this.CreateGLWorld(planeMat, midPt, newCanvas, this._useWebGL);//fillMaterial, strokeMaterial); 591 var world = this.getGLWorld(newCanvas, this._useWebGL);//this.options.use3D);//this.CreateGLWorld(planeMat, midPt, newCanvas, this._useWebGL);//fillMaterial, strokeMaterial);
@@ -978,11 +978,11 @@ exports.PenTool = Montage.create(ShapeTool, {
978 } 978 }
979 else{ 979 else{
980 for (var i=0;i<this.application.ninja.selectedElements.length;i++){ 980 for (var i=0;i<this.application.ninja.selectedElements.length;i++){
981 var element = this.application.ninja.selectedElements[i]._element; 981 var element = this.application.ninja.selectedElements[i]
982 console.log("Entered pen tool, had selected: " + element.elementModel.selection); 982 console.log("Entered pen tool, had selected: " + element.elementModel.selection);
983 if (element.elementModel.selection === 'Subpath'){ //TODO what to do if the canvas is drawn by tag tool? 983 if (element.elementModel.selection === 'Subpath'){ //TODO what to do if the canvas is drawn by tag tool?
984 //set the pen canvas to be the selected canvas 984 //set the pen canvas to be the selected canvas
985 this._penCanvas = this.application.ninja.selectedElements[i]._element; 985 this._penCanvas = this.application.ninja.selectedElements[i];
986 986
987 // get the subpath for this world 987 // get the subpath for this world
988 this._selectedSubpath = null; 988 this._selectedSubpath = null;
@@ -1057,7 +1057,7 @@ exports.PenTool = Montage.create(ShapeTool, {
1057 var els = []; 1057 var els = [];
1058 ElementController.removeElement(this._penCanvas); 1058 ElementController.removeElement(this._penCanvas);
1059 els.push(this._penCanvas); 1059 els.push(this._penCanvas);
1060 NJevent( "deleteSelection", els ); 1060 NJevent( "elementsRemoved", els );
1061 this._penCanvas = null; 1061 this._penCanvas = null;
1062 } 1062 }
1063 } 1063 }
@@ -1073,9 +1073,9 @@ exports.PenTool = Montage.create(ShapeTool, {
1073 els.push(this.application.ninja.selectedElements[i]); 1073 els.push(this.application.ninja.selectedElements[i]);
1074 } 1074 }
1075 for(i=0; i<len; i++) { 1075 for(i=0; i<len; i++) {
1076 ElementController.removeElement(els[i]._element); 1076 ElementController.removeElement(els[i]);
1077 } 1077 }
1078 NJevent( "deleteSelection", els ); 1078 NJevent( "elementsRemoved", els );
1079 1079
1080 //clear out the selected path if it exists 1080 //clear out the selected path if it exists
1081 if (this._selectedSubpath) { 1081 if (this._selectedSubpath) {