diff options
author | hwc487 | 2012-04-04 16:32:53 -0700 |
---|---|---|
committer | hwc487 | 2012-04-04 16:32:53 -0700 |
commit | 6ee8b65742fbe61b4429dc8c7dc9ca33a3e43600 (patch) | |
tree | f267e05f623ed90d1cc841b8c79a338d6d8e807c /js/tools/PenTool.js | |
parent | 16f62ca09cc428043e8fef8bdeea11a989e62bc0 (diff) | |
parent | 17ca01f54591187f5c0812c0fd2cb7260afa9639 (diff) | |
download | ninja-6ee8b65742fbe61b4429dc8c7dc9ca33a3e43600.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Snapping
Conflicts:
js/panels/presets/animations-presets.reel/animations-presets.js
js/panels/presets/style-presets.reel/style-presets.js
js/panels/presets/transitions-presets.reel/transitions-presets.js
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-x | js/tools/PenTool.js | 12 |
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) { |