aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/shapes-controller.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-04 17:11:06 -0700
committerNivesh Rajbhandari2012-06-04 17:12:36 -0700
commitd44f3196c925332dcaf45f7cf8c64e22a1994bb9 (patch)
tree770ac0df9b73ee8fad584bfd1708ed2866910c92 /js/controllers/elements/shapes-controller.js
parentc1ec69879028220b0c3f11ad6e24035bf527802c (diff)
downloadninja-d44f3196c925332dcaf45f7cf8c64e22a1994bb9.tar.gz
Fill and Ink-Bottle fixes.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 626dedb6..f19aaffb 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -584,6 +584,44 @@ exports.ShapesController = Montage.create(CanvasController, {
584 } 584 }
585 }, 585 },
586 586
587 getFill: {
588 value: function(el, fill) {
589 var fillInfo = {},
590 color;
591 if(fill.colorInfo) {
592 fillInfo.colorInfo = {};
593 color = this.getColor(el, true);
594 if(color && color.color) {
595 fillInfo.colorInfo.mode = color.mode;
596 fillInfo.colorInfo.color = color.color;
597 } else {
598 fillInfo.colorInfo.mode = "nocolor";
599 fillInfo.colorInfo.color = null;
600 }
601 }
602 if(fill.webGLInfo) {
603 fillInfo.webGLInfo = {};
604 if(this.getShapeProperty(el, "useWebGl")) {
605 fillInfo.webGLInfo.material = this.getProperty("fillMaterial");
606 } else {
607 fillInfo.webGLInfo.material = null;
608 }
609 }
610 return fillInfo;
611 }
612 },
613
614 setFill: {
615 value: function(el, fill, eventType, source) {
616 if(fill.colorInfo) {
617 this.setColor(el, fill.colorInfo, true);
618 }
619 if(fill.webGLInfo) {
620 this.setProperty(el, "fillMaterial", fill.webGLInfo.material, eventType, source);
621 }
622 }
623 },
624
587 DisplayMaterials: { 625 DisplayMaterials: {
588 value: function (cb) 626 value: function (cb)
589 { 627 {