diff options
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 38 |
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 | { |