diff options
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/element-mediator.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index d62fa1f8..a2440fb4 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -90,9 +90,12 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
90 | _addElement: { | 90 | _addElement: { |
91 | value: function(el, rules, noEvent) { | 91 | value: function(el, rules, noEvent) { |
92 | ElementController.addElement(el, rules); | 92 | ElementController.addElement(el, rules); |
93 | var p3d = this.get3DProperties(el); | 93 | // var p3d = this.get3DProperties(el); |
94 | if(p3d) { | 94 | // if(p3d) { |
95 | el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); | 95 | // el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); |
96 | // } | ||
97 | if(el.elementModel && el.elementModel.props3D) { | ||
98 | el.elementModel.props3D.init(el, false); | ||
96 | } | 99 | } |
97 | if(!noEvent) { | 100 | if(!noEvent) { |
98 | this.application.ninja.documentController.activeDocument.needsSave = true; | 101 | this.application.ninja.documentController.activeDocument.needsSave = true; |
@@ -670,17 +673,17 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
670 | }, | 673 | }, |
671 | 674 | ||
672 | setMatrix: { | 675 | setMatrix: { |
673 | value: function(el, mat, isChanging) { | 676 | value: function(el, mat, isChanging, source) { |
674 | var dist = el.elementModel.controller["getPerspectiveDist"](el); | 677 | var dist = el.elementModel.controller["getPerspectiveDist"](el); |
675 | el.elementModel.controller["set3DProperties"](el, [{mat:mat, dist:dist}], 0, !isChanging); | 678 | el.elementModel.controller["set3DProperties"](el, [{mat:mat, dist:dist}], 0, !isChanging); |
676 | 679 | ||
677 | if(isChanging) | 680 | if(isChanging) |
678 | { | 681 | { |
679 | NJevent("elementChanging", {type : "setMatrix", source: null, data: {"els": [el], "prop": "matrix", "value": mat}, redraw: null}); | 682 | NJevent("elementChanging", {type : "setMatrix", source: source, data: {"els": [el], "prop": "matrix", "value": mat}, redraw: null}); |
680 | } | 683 | } |
681 | else | 684 | else |
682 | { | 685 | { |
683 | NJevent("elementChange", {type : "setMatrix", source: null, data: {"els": [el], "prop": "matrix", "value": mat}, redraw: null}); | 686 | NJevent("elementChange", {type : "setMatrix", source: source, data: {"els": [el], "prop": "matrix", "value": mat}, redraw: null}); |
684 | } | 687 | } |
685 | } | 688 | } |
686 | }, | 689 | }, |