aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-03 00:38:13 -0800
committerValerio Virgillito2012-02-03 00:38:13 -0800
commit7950424cf704bb221971f4645406b01e6979db18 (patch)
tree6c9d208a2bc8c0d2da6a9001681787bbe1d6a14b /js
parent197ae04f7677b7a5890a589ba572e750a229c502 (diff)
downloadninja-7950424cf704bb221971f4645406b01e6979db18.tar.gz
Fix the main user component to create distinct instance of component.
- Create a distinct instance of button - Cleanup. Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
index ec092604..8c81b3ab 100644
--- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
+++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
@@ -97,12 +97,13 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
97 this.application.ninja.currentDocument._window.addComponent(element, {type: "Button", path: component.module, name: "Button"}, function(instance, element) { 97 this.application.ninja.currentDocument._window.addComponent(element, {type: "Button", path: component.module, name: "Button"}, function(instance, element) {
98 98
99 var styles = { 99 var styles = {
100 'position': 'absolute', 100 'position': 'absolute',
101 'top' : that._stash.dropx + 'px', 101 'top' : that._stash.dropy + 'px',
102 'left' : that._stash.dropy + 'px', 102 'left' : that._stash.dropx + 'px',
103 '-webkit-transform-style' : 'preserve-3d', 103 '-webkit-transform-style' : 'preserve-3d',
104 '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' 104 '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'
105 }; 105 };
106
106 107
107 that.application.ninja.currentDocument.setComponentInstance(instance, element); 108 that.application.ninja.currentDocument.setComponentInstance(instance, element);
108 109
@@ -134,6 +135,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
134 value: function(name) { 135 value: function(name) {
135 var el; 136 var el;
136 el = NJUtils.makeNJElement(name, "Button", "component"); 137 el = NJUtils.makeNJElement(name, "Button", "component");
138 //el.elementModel.pi = "buttonPi";
137 el.setAttribute("type", "button"); 139 el.setAttribute("type", "button");
138 return el; 140 return el;
139 } 141 }