diff options
author | Pushkar Joshi | 2012-04-19 14:12:45 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-04-19 14:12:45 -0700 |
commit | 9f32d7e5454db3189209fc68a286a7fdb0c31fe8 (patch) | |
tree | a51c2bf67839a25158c30752b44fdea0eac28b9d | |
parent | dc1e8dde18c40cf740bd2fe09165784e0d415fab (diff) | |
parent | 6d33345a9e609e36539d2efa25569f5eeb04a2af (diff) | |
download | ninja-9f32d7e5454db3189209fc68a286a7fdb0c31fe8.tar.gz |
Merge branch 'master' into pentool
Conflicts:
js/helper-classes/3D/view-utils.js
87 files changed, 7613 insertions, 2912 deletions
diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js index 7af7e824..b8894c18 100755 --- a/js/controllers/elements/canvas-controller.js +++ b/js/controllers/elements/canvas-controller.js | |||
@@ -33,5 +33,13 @@ exports.CanvasController = Montage.create(ElementController, { | |||
33 | ElementController.setProperty(el, p, value); | 33 | ElementController.setProperty(el, p, value); |
34 | } | 34 | } |
35 | } | 35 | } |
36 | }, | ||
37 | |||
38 | setProperties: { | ||
39 | value: function(element, properties) { | ||
40 | for(var property in properties) { | ||
41 | this.setProperty(element, property, properties[property]); | ||
42 | } | ||
43 | } | ||
36 | } | 44 | } |
37 | }); \ No newline at end of file | 45 | }); \ No newline at end of file |
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index cd7fa16d..e9dde5fc 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -396,8 +396,8 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
396 | if(isFill) | 396 | if(isFill) |
397 | { | 397 | { |
398 | // Properties Panel asks for fill color even for shapes that only have strokes | 398 | // Properties Panel asks for fill color even for shapes that only have strokes |
399 | // Check that shape object has a getFillColor method before getting fills | 399 | // Check that shape object supports fills |
400 | if(el.elementModel.shapeModel.GLGeomObj.getFillColor) | 400 | if(el.elementModel.shapeModel.GLGeomObj.canFill) |
401 | { | 401 | { |
402 | return this.application.ninja.colorController.colorModel.webGlToColor(el.elementModel.shapeModel.GLGeomObj.getFillColor()); | 402 | return this.application.ninja.colorController.colorModel.webGlToColor(el.elementModel.shapeModel.GLGeomObj.getFillColor()); |
403 | } | 403 | } |
@@ -494,28 +494,36 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
494 | webGl; | 494 | webGl; |
495 | if(isFill) | 495 | if(isFill) |
496 | { | 496 | { |
497 | if(mode) | 497 | // skip shape types that don't have fill color |
498 | if(el.elementModel.shapeModel.GLGeomObj.canFill) | ||
498 | { | 499 | { |
499 | switch (mode) { | 500 | if(mode) |
500 | case 'nocolor': | 501 | { |
501 | el.elementModel.shapeModel.GLGeomObj.setFillColor(null); | 502 | switch (mode) { |
502 | break; | 503 | case 'nocolor': |
503 | case 'gradient': | 504 | el.elementModel.shapeModel.GLGeomObj.setFillColor(null); |
504 | if(el.elementModel.shapeModel.useWebGl) | 505 | break; |
505 | { | 506 | case 'gradient': |
506 | this._setGradientMaterial(el, color.color.gradientMode, isFill); | 507 | if(el.elementModel.shapeModel.useWebGl) |
507 | } | 508 | { |
508 | el.elementModel.shapeModel.GLGeomObj.setFillColor({gradientMode:color.color.gradientMode, color:color.color.stops}); | 509 | this._setGradientMaterial(el, color.color.gradientMode, isFill); |
509 | break; | 510 | } |
510 | default: | 511 | el.elementModel.shapeModel.GLGeomObj.setFillColor({gradientMode:color.color.gradientMode, color:color.color.stops}); |
511 | if(el.elementModel.shapeModel.useWebGl) | 512 | break; |
512 |