aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/document/templates/montage-html/main.reel/main.js43
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js21
-rwxr-xr-xjs/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js54
-rw-r--r--node_modules/components-data/feed-reader.json15
-rw-r--r--node_modules/components-data/map.json22
-rw-r--r--node_modules/components-data/picasa-carousel.json15
-rw-r--r--node_modules/components-data/searchfield.json20
-rw-r--r--node_modules/components-data/textfield.json4
-rw-r--r--node_modules/components-data/youtube-channel.json16
-rw-r--r--node_modules/montage/examples/feed-reader/images/07-map-marker.pngbin0 -> 3131 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/10-medical.pngbin0 -> 2915 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/100-coffee.pngbin0 -> 2958 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/107-widescreen.pngbin0 -> 2986 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/125-food.pngbin0 -> 3038 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/142-wine-bottle.pngbin0 -> 187 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/34-coffee.pngbin0 -> 3052 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/35-shopping.pngbin0 -> 2970 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/38-airplane.pngbin0 -> 3004 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/41-picture-frame.pngbin0 -> 2928 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/48-fork-and-knife.pngbin0 -> 2882 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/87-wine-glass.pngbin0 -> 2983 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/index.html81
-rw-r--r--node_modules/montage/examples/feed-reader/main.reel/main.html184
-rw-r--r--node_modules/montage/examples/feed-reader/main.reel/main.js45
-rw-r--r--node_modules/montage/examples/feed-reader/map-example.reel/main.css2
-rw-r--r--node_modules/montage/examples/feed-reader/map-example.reel/main.html58
-rw-r--r--node_modules/montage/examples/feed-reader/map-example.reel/main.js24
-rw-r--r--node_modules/montage/examples/feed-reader/package.json10
-rwxr-xr-xnode_modules/montage/examples/youtube-channel-example/index.html44
-rwxr-xr-xnode_modules/montage/examples/youtube-channel-example/package.json7
-rwxr-xr-xnode_modules/montage/examples/youtube-channel-example/style.css47
-rwxr-xr-xnode_modules/montage/examples/youtube-channel-example/youtube-channel-example.js8
-rwxr-xr-xnode_modules/montage/lab/sandbox/ui/picasa-carousel-test/index.html77
-rwxr-xr-xnode_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.css8
-rwxr-xr-xnode_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.html75
-rwxr-xr-xnode_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.js35
-rwxr-xr-xnode_modules/montage/lab/sandbox/ui/picasa-carousel-test/package.json10
-rwxr-xr-xnode_modules/montage/test/ui/youtube-player-spec.js363
-rw-r--r--node_modules/montage/test/ui/youtube-player-test/youtube-player-test.html47
-rwxr-xr-xnode_modules/montage/test/ui/youtube-player-test/youtube-player-test.js9
-rw-r--r--node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.html90
-rw-r--r--node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.js13
-rw-r--r--node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.html83
-rw-r--r--node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.js82
-rw-r--r--node_modules/montage/ui/map.reel/map.css9
-rw-r--r--node_modules/montage/ui/map.reel/map.html69
-rw-r--r--node_modules/montage/ui/map.reel/map.js283
-rw-r--r--node_modules/montage/ui/picasa-carousel.reel/image.reel/image.html37
-rw-r--r--node_modules/montage/ui/picasa-carousel.reel/image.reel/image.js20
-rwxr-xr-xnode_modules/montage/ui/picasa-carousel.reel/picasa-carousel.css44
-rwxr-xr-xnode_modules/montage/ui/picasa-carousel.reel/picasa-carousel.html181
-rw-r--r--node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js134
-rwxr-xr-xnode_modules/montage/ui/template.js6
-rw-r--r--node_modules/montage/ui/text-input.js22
-rw-r--r--node_modules/montage/ui/youtube-channel.reel/youtube-channel.html34
-rw-r--r--node_modules/montage/ui/youtube-channel.reel/youtube-channel.js101
-rw-r--r--node_modules/montage/ui/youtube-player.reel/youtube-player.html29
-rw-r--r--node_modules/montage/ui/youtube-player.reel/youtube-player.js179
58 files changed, 2726 insertions, 34 deletions
diff --git a/js/document/templates/montage-html/main.reel/main.js b/js/document/templates/montage-html/main.reel/main.js
index 567f481c..6c141108 100644
--- a/js/document/templates/montage-html/main.reel/main.js
+++ b/js/document/templates/montage-html/main.reel/main.js
@@ -17,7 +17,25 @@ 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.addComponent = function(element, data, callback) {
22 var component;
23
24 component = require.async(data.path)
25 .then(function(component) {
26 var componentRequire = component[data.name];
27 var componentInstance = componentRequire.create();
28
29 componentInstance.element = element;
30 //componentInstance.deserializedFromTemplate();
31 componentInstance.needsDraw = true;
32 componentInstance.ownerComponent = self;
33
34 callback(componentInstance, element);
35 })
36 .end();
37
38 };
21// window.addBinding = this.addBindingToUserDocument; 39// window.addBinding = this.addBindingToUserDocument;
22 40
23 // Dispatch event when this template has loaded. 41 // Dispatch event when this template has loaded.
@@ -27,28 +45,5 @@ exports.Main = Montage.create(Component, {
27 document.body.dispatchEvent( newEvent ); 45 document.body.dispatchEvent( newEvent );
28 46
29 } 47 }
30 },
31
32 // Adding components to the user document by using a async require.
33 addComponentToUserDocument:{
34 value:function(element, data, callback){
35
36 var component;
37
38 component = require.async(data.path)
39 .then(function(component) {
40 var componentRequire = component[data.name];
41 var componentInstance = componentRequire.create();
42
43 componentInstance.element = element;
44 //componentInstance.deserializedFromTemplate();
45 componentInstance.needsDraw = true;
46
47 callback(componentInstance, element);
48 })
49 .end();
50
51 }
52 } 48 }
53
54}); \ No newline at end of file 49}); \ No newline at end of file
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 1caacd00..a755e9e2 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -471,7 +471,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
471 value: function( plane ) { 471 value: function( plane ) {
472 this._elementCache = new Array; 472 this._elementCache = new Array;
473 473
474 var stage = this.getStage(); 474// var stage = this.getStage();
475 var stage = this.application.ninja.currentSelectedContainer || this.getStage();
475 this.hLoadElementCache( stage, plane, 0 ); 476 this.hLoadElementCache( stage, plane, 0 );
476 this._isCacheInvalid = false; 477 this._isCacheInvalid = false;
477 478
@@ -570,6 +571,11 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
570 571
571 hLoadElementCache : { 572 hLoadElementCache : {
572 value: function( elt, plane, depth ) { 573 value: function( elt, plane, depth ) {
574 if(depth > 1)
575 {
576 return;
577 }
578
573 if (depth > 0) 579 if (depth > 0)
574 { 580 {
575 // check if the element is on the specified plane 581 // check if the element is on the specified plane
@@ -590,8 +596,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
590 elt.elementModel.isIn2DSnapCache = false; 596 elt.elementModel.isIn2DSnapCache = false;
591 } 597 }
592 598
593 // TODO - Don't traverse components' children 599 // TODO - Don't traverse svg and components' children
594// if(elt.elementModel && elt.elementModel.isComponent)
595 if(elt.nodeName.toLowerCase() === "svg" || (elt.elementModel && (elt.elementModel.isComponent || (elt.elementModel.selection === "SVG")))) 600 if(elt.nodeName.toLowerCase() === "svg" || (elt.elementModel && (elt.elementModel.isComponent || (elt.elementModel.selection === "SVG"))))
596 { 601 {
597 return; 602 return;
@@ -964,7 +969,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
964 snapToElements : { 969 snapToElements : {
965 value: function( screenPt, hitRecs ) { 970 value: function( screenPt, hitRecs ) {
966 // start at the stage. 971 // start at the stage.
967 var stage = this.getStage(); 972// var stage = this.getStage();
973 var stage = this.application.ninja.currentSelectedContainer || this.getStage();
968 974
969 // the root should be the 'view' canvas, so the first matrix is the camera 975 // the root should be the 'view' canvas, so the first matrix is the camera
970 viewUtils.setViewportObj( stage ); 976 viewUtils.setViewportObj( stage );
@@ -980,