diff options
author | Nivesh Rajbhandari | 2012-06-28 17:54:15 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-06-28 17:54:15 -0700 |
commit | e3eb68c3a0b911acd873ee6211931b8f4e620030 (patch) | |
tree | a0b1fa11fb6bca1c232adff0f52a19d71404984a /js/controllers | |
parent | b4b54f6cc084b3f7483ebed1e15c1b4770949d58 (diff) | |
download | ninja-e3eb68c3a0b911acd873ee6211931b8f4e620030.tar.gz |
Fixed not being able to draw linear and radial gradients. Also fixed IKNINJA-1721 - File dirty marker does not show when modifying elements and IKNinja-1581 and IKNinja-1758 - Paint bucket fill bugs with lines and brush objects. Squashed commit of the following:
commit 7cad082c89911d34a99feeef8e91d22b89cae8f1
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 17:52:07 2012 -0700
Fix for not being able to draw linear and radial gradient materials.
I'm turning off pre-flight support of gradients for WebGL since it conflicts with the materials' color support.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit d0df8a2bff052d855bafb7885792b1dfff8eab7d
Merge: 2c67d26 b4b54f6
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 17:50:11 2012 -0700
Merge branch 'refs/heads/ninja-internal' into ToolFixes
commit 2c67d264851f0897fdca8ca887c1c82d0e434217
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 15:06:13 2012 -0700
IKNINJA-1721 - File dirty marker does not show when modifying elements.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit bb4b6a52eb75efb2f435cdb53f810ae3bc1f1fc3
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Thu Jun 28 11:15:34 2012 -0700
IKNinja-1581 and IKNinja-1758 - Paint bucket fill bugs with lines and brush objects.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 8 | ||||
-rwxr-xr-x | js/controllers/styles-controller.js | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 74353454..5920d51a 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -138,6 +138,10 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
138 | this.application.ninja.elementMediator.replaceElement(canvas, el); | 138 | this.application.ninja.elementMediator.replaceElement(canvas, el); |
139 | break; | 139 | break; |
140 | case "strokeMaterial": | 140 | case "strokeMaterial": |
141 | // skip shape types that don't support WebGL | ||
142 | if(!el.elementModel.shapeModel.GLGeomObj.useWebGl) { | ||
143 | return; | ||
144 | } | ||
141 | m = Object.create(MaterialsModel.getMaterial(value)); | 145 | m = Object.create(MaterialsModel.getMaterial(value)); |
142 | if(m) | 146 | if(m) |
143 | { | 147 | { |
@@ -152,6 +156,10 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
152 | } | 156 | } |
153 | break; | 157 | break; |
154 | case "fillMaterial": | 158 | case "fillMaterial": |
159 | // skip shape types that don't support WebGL or fill color | ||
160 | if(!el.elementModel.shapeModel.GLGeomObj.canFill || !el.elementModel.shapeModel.GLGeomObj.useWebGl) { | ||
161 | return; | ||
162 | } | ||
155 | m = Object.create(MaterialsModel.getMaterial(value)); | 163 | m = Object.create(MaterialsModel.getMaterial(value)); |
156 | if(m) | 164 | if(m) |
157 | { | 165 | { |
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 0f847653..e7f95335 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -1437,11 +1437,11 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
1437 | 1437 | ||
1438 | ///// Dispatch modified event | 1438 | ///// Dispatch modified event |
1439 | NJevent('styleSheetModified', eventData); | 1439 | NJevent('styleSheetModified', eventData); |
1440 | this.currentDocument.model.needsSave = true; | ||
1440 | 1441 | ||
1441 | ///// If the sheet doesn't already exist in the list of modified | 1442 | ///// If the sheet doesn't already exist in the list of modified |
1442 | ///// sheets, dispatch dirty event and add the sheet to the list | 1443 | ///// sheets, dispatch dirty event and add the sheet to the list |
1443 | if(sheetSearch.length === 0) { | 1444 | if(sheetSearch.length === 0) { |
1444 | this.currentDocument.model.needsSave = true; | ||
1445 | this.dirtyStyleSheets.push({ | 1445 | this.dirtyStyleSheets.push({ |
1446 | document : sheet.ownerNode.ownerDocument, | 1446 | document : sheet.ownerNode.ownerDocument, |
1447 | stylesheet : sheet | 1447 | stylesheet : sheet |