diff options
author | Jon Reid | 2012-04-26 13:13:17 -0700 |
---|---|---|
committer | Jon Reid | 2012-04-26 13:13:17 -0700 |
commit | ddbc1ac7eb35fee9254f4842fe29ab35de3d214c (patch) | |
tree | 3cfacd0f4714e929584e7bb915dfd3613fb74226 /js/controllers/elements/shapes-controller.js | |
parent | 47e63e06fe01a1d66d3909b5f6acc0d987f97d9d (diff) | |
parent | 53eba0fe1bd27396a8b7cb7828e51457d8d9576a (diff) | |
download | ninja-ddbc1ac7eb35fee9254f4842fe29ab35de3d214c.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index e9dde5fc..8d7b74f0 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -20,8 +20,10 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
20 | color; | 20 | color; |
21 | switch(p) { | 21 | switch(p) { |
22 | case "strokeSize": | 22 | case "strokeSize": |
23 | // TODO - For now, just handling px units. | ||
24 | this.setShapeProperty(el, "strokeSize", value); | 23 | this.setShapeProperty(el, "strokeSize", value); |
24 | var strokeInfo = njModule.NJUtils.getValueAndUnits(value); | ||
25 | val = this.GetValueInPixels(strokeInfo[0], strokeInfo[1]); | ||
26 | |||
25 | // TODO - For now, just handle Line, Rectangle and Oval. Eventually, move this into each class's | 27 | // TODO - For now, just handle Line, Rectangle and Oval. Eventually, move this into each class's |
26 | // setStrokeWidth code like SubPath and BrushStroke do. | 28 | // setStrokeWidth code like SubPath and BrushStroke do. |
27 | var geomType = el.elementModel.shapeModel.GLGeomObj.geomType(); | 29 | var geomType = el.elementModel.shapeModel.GLGeomObj.geomType(); |
@@ -527,16 +529,6 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
527 | } | 529 | } |
528 | else | 530 | else |
529 | { | 531 | { |
530 | // Support for ink-bottle tool | ||
531 | if(color.strokeInfo) | ||
532 | { | ||
533 | var strokeWidth = this.GetValueInPixels(color.strokeInfo.strokeSize, | ||
534 | color.strokeInfo.strokeUnits); | ||
535 | el.elementModel.shapeModel.GLGeomObj.setStrokeWidth(strokeWidth); | ||
536 | this.setShapeProperty(el, "strokeSize", color.strokeInfo.strokeSize + " " | ||
537 | + color.strokeInfo.strokeUnits); | ||
538 | } | ||
539 | |||
540 | if(mode) | 532 | if(mode) |
541 | { | 533 | { |
542 | switch (mode) { | 534 | switch (mode) { |
@@ -559,6 +551,12 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
559 | el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl); | 551 | el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl); |
560 | } | 552 | } |
561 | } | 553 | } |
554 | |||
555 | // Support for ink-bottle tool | ||
556 | if(color.strokeInfo) | ||
557 | { | ||
558 | this.setProperty(el, "strokeSize", color.strokeInfo.strokeSize + " " + color.strokeInfo.strokeUnits); | ||
559 | } | ||
562 | } | 560 | } |
563 | el.elementModel.shapeModel.GLWorld.render(); | 561 | el.elementModel.shapeModel.GLWorld.render(); |
564 | this.application.ninja.documentController.activeDocument.needsSave = true; | 562 | this.application.ninja.documentController.activeDocument.needsSave = true; |