aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-06 15:41:48 -0800
committerNivesh Rajbhandari2012-02-06 15:41:48 -0800
commit75486be2839494c9b54833aff8f5eef3f9542151 (patch)
treeb31d26275087bb8b6014a8cb2c1ffca8a3a28ef3 /js/mediators
parentf94b0c5ada403379b3ff8a900c2a2aabcecce49e (diff)
downloadninja-75486be2839494c9b54833aff8f5eef3f9542151.tar.gz
Support toggling between 2d and 3d canvas context. This requires us to create a new canvas with all the same values as the canvas being replaced and copying over all the shape data.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/mediators')
-rw-r--r--js/mediators/element-mediator.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index c44e1cb5..9aefbca6 100644
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -112,6 +112,13 @@ exports.ElementMediator = Montage.create(NJComponent, {
112 } 112 }
113 }, 113 },
114 114
115 replaceElement: {
116 value: function(el, el2) {
117 el2.elementModel = el.elementModel;
118 this.application.ninja.currentDocument.documentRoot.replaceChild(el2, el);
119 }
120 },
121
115 getNJProperty: { 122 getNJProperty: {
116 value: function(el, p) { 123 value: function(el, p) {
117 if(el.elementModel) { 124 if(el.elementModel) {