aboutsummaryrefslogtreecommitdiff
path: root/js/document/templates
diff options
context:
space:
mode:
authorJohn Mayhew2012-04-02 16:28:39 -0700
committerJohn Mayhew2012-04-02 16:28:39 -0700
commitb4155fb4c33675a8a7cd37473513718043fdf0ba (patch)
tree3d8c802473f2395d53d599ec9d8b70b60a4db50c /js/document/templates
parent5ba9aeac94c86049423fd5d4b37b277263939c13 (diff)
parentc6de22bf42be90b403491b5f87b1818d9020310c (diff)
downloadninja-b4155fb4c33675a8a7cd37473513718043fdf0ba.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts: js/helper-classes/RDGE/rdge-compiled.js js/helper-classes/RDGE/runtime/GLRuntime.js js/helper-classes/RDGE/src/core/script/MeshManager.js js/helper-classes/RDGE/src/core/script/engine.js js/helper-classes/RDGE/src/core/script/fx/ssao.js js/helper-classes/RDGE/src/core/script/init_state.js js/helper-classes/RDGE/src/core/script/run_state.js js/helper-classes/RDGE/src/core/script/scenegraphNodes.js js/helper-classes/RDGE/src/core/script/utilities.js js/helper-classes/RDGE/src/tools/compile-rdge-core.bat js/helper-classes/RDGE/src/tools/compile-rdge-core.sh js/helper-classes/RDGE/src/tools/rdge-compiled.js js/lib/drawing/world.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/deform-material.js js/lib/rdge/materials/flat-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/linear-gradient-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-blur-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/relief-tunnel-material.js js/lib/rdge/materials/square-tunnel-material.js js/lib/rdge/materials/star-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/tunnel-material.js js/lib/rdge/materials/twist-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/uber-material.js js/lib/rdge/materials/water-material.js js/lib/rdge/materials/z-invert-material.js js/preloader/Preloader.js
Diffstat (limited to 'js/document/templates')
-rwxr-xr-xjs/document/templates/montage-html/default_html.css4
-rw-r--r--js/document/templates/montage-html/main.reel/main.js42
2 files changed, 22 insertions, 24 deletions
diff --git a/js/document/templates/montage-html/default_html.css b/js/document/templates/montage-html/default_html.css
index 68300edf..6c2b415f 100755
--- a/js/document/templates/montage-html/default_html.css
+++ b/js/document/templates/montage-html/default_html.css
@@ -72,4 +72,8 @@ body
72 72
73.elem-red-outline { 73.elem-red-outline {
74 outline: red solid thin; 74 outline: red solid thin;
75}
76
77.nj-preset-transition {
78 -webkit-transition: all 450ms linear !important;
75} \ No newline at end of file 79} \ No newline at end of file
diff --git a/js/document/templates/montage-html/main.reel/main.js b/js/document/templates/montage-html/main.reel/main.js
index 567f481c..019c675e 100644
--- a/js/document/templates/montage-html/main.reel/main.js
+++ b/js/document/templates/montage-html/main.reel/main.js
@@ -17,38 +17,32 @@ exports.Main = Montage.create(Component, {
17 */ 17 */
18 templateDidLoad: { 18 templateDidLoad: {
19 value: function(){ 19 value: function(){
20 window.addComponent = this.addComponentToUserDocument; 20 var self = this;
21// window.addBinding = this.addBindingToUserDocument; 21 window.addComponent = function(element, data, callback) {
22 var component;
22 23
23 // Dispatch event when this template has loaded. 24 component = require.async(data.path)
24 var newEvent = document.createEvent( "CustomEvent" ); 25 .then(function(component) {
25 newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); 26 var componentRequire = component[data.name];
27 var componentInstance = componentRequire.create();
26 28
27 document.body.dispatchEvent( newEvent ); 29 componentInstance.element = element;
28
29 }
30 },
31 30
32 // Adding components to the user document by using a async require. 31 componentInstance.needsDraw = true;
33 addComponentToUserDocument:{ 32 componentInstance.ownerComponent = self;
34 value:function(element, data, callback){
35 33
36 var component; 34 callback(componentInstance, element);
35 })
36 .end();
37 37
38 component = require.async(data.path) 38 };
39 .then(function(component) {
40 var componentRequire = component[data.name];
41 var componentInstance = componentRequire.create();
42 39
43 componentInstance.element = element; 40 // Dispatch event when this template has loaded.
44 //componentInstance.deserializedFromTemplate(); 41 var newEvent = document.createEvent( "CustomEvent" );
45 componentInstance.needsDraw = true; 42 newEvent.initCustomEvent( "userTemplateDidLoad", false, true );
46 43
47 callback(componentInstance, element); 44 document.body.dispatchEvent( newEvent );
48 })
49 .end();
50 45
51 } 46 }
52 } 47 }
53
54}); \ No newline at end of file 48}); \ No newline at end of file