diff options
Diffstat (limited to 'js')
46 files changed, 311 insertions, 28 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index 1d0ad776..9c8946c4 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js | |||
@@ -1,3 +1,9 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
1 | /* ComputedStyleSubPanel.js */ | 7 | /* ComputedStyleSubPanel.js */ |
2 | var Montage = require("montage").Montage, | 8 | var Montage = require("montage").Montage, |
3 | Component = require("montage/ui/component").Component; | 9 | Component = require("montage/ui/component").Component; |
diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index 79813c92..5ed46b3c 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js | |||
@@ -1,3 +1,9 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
1 | /* ComputedStyleSubPanel.js */ | 7 | /* ComputedStyleSubPanel.js */ |
2 | var Montage = require("montage").Montage, | 8 | var Montage = require("montage").Montage, |
3 | Component = require("montage/ui/component").Component, | 9 | Component = require("montage/ui/component").Component, |
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index 1290aaac..1824c7c3 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -1,3 +1,8 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
1 | 6 | ||
2 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
3 | Component = require("montage/ui/component").Component; | 8 | Component = require("montage/ui/component").Component; |
diff --git a/js/data/tools-data.js b/js/data/tools-data.js index 00de9236..cf48757d 100755 --- a/js/data/tools-data.js +++ b/js/data/tools-data.js | |||
@@ -153,21 +153,21 @@ exports.ToolsData = Montage.create(Montage, { | |||
153 | "action": "FillTool", | 153 | "action": "FillTool", |
154 | "toolTip": "Fill Tool", | 154 | "toolTip": "Fill Tool", |
155 | "cursor": "url('images/tools/bucket_down.png'), default", | 155 | "cursor": "url('images/tools/bucket_down.png'), default", |
156 | "lastInGroup": false, | ||
157 | "container": false, | ||
158 | "selected": false | ||
159 | }, | ||
160 | { | ||
161 | "id": "InkBottleTool", | ||
162 | "properties": "inkbottleProperties", | ||
163 | "spriteSheet": true, | ||
164 | "action": "InkBottleTool", | ||
165 | "toolTip": "Ink Bottle Tool", | ||
166 | "cursor": "url('images/tools/inkbottle_down.png'), default", | ||
156 | "lastInGroup": true, | 167 | "lastInGroup": true, |
157 | "container": false, | 168 | "container": false, |
158 | "selected": false | 169 | "selected": false |
159 | }, | 170 | }, |
160 | // { | ||
161 | // "id": "InkBottleTool", | ||
162 | // "properties": "inkbottleProperties", | ||
163 | // "spriteSheet": true, | ||
164 | // "action": "InkBottleTool", | ||
165 | // "toolTip": "Ink Bottle Tool", | ||
166 | // "cursor": "url('images/tools/inkbottle_down.png'), default", | ||
167 | // "lastInGroup": false, | ||
168 | // "container": false, | ||
169 | // "selected": false | ||
170 | // }, | ||
171 | { | 171 | { |
172 | "id": "EyedropperTool", | 172 | "id": "EyedropperTool", |
173 | "properties": "eyedropperProperties", | 173 | "properties": "eyedropperProperties", |
diff --git a/js/document/html-document.js b/js/document/html-document.js index 8798b407..1901079d 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -177,15 +177,15 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
177 | cdm.collectGLData( elt, this._glData ); | 177 | cdm.collectGLData( elt, this._glData ); |
178 | } | 178 | } |
179 | 179 | ||
180 | return this._glData | 180 | return this._glData; |
181 | }, | 181 | }, |
182 | 182 | ||
183 | set: function(value) | 183 | set: function(value) |
184 | { | 184 | { |
185 | var elt = this.iframe.contentWindow.document.getElementById("UserContent"); | 185 | var elt = this.documentRoot; |
186 | if (elt) | 186 | if (elt) |
187 | { | 187 | { |
188 | console.log( "load canvas data: " + value ); | 188 | console.log( "load canvas data: " , value ); |
189 | var cdm = new CanvasDataManager(); | 189 | var cdm = new CanvasDataManager(); |
190 | cdm.loadGLData(elt, value); | 190 | cdm.loadGLData(elt, value); |
191 | } | 191 | } |
@@ -389,6 +389,25 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
389 | //Inserting user's document into template | 389 | //Inserting user's document into template |
390 | this._templateDocument.head.innerHTML = this._userDocument.content.head; | 390 | this._templateDocument.head.innerHTML = this._userDocument.content.head; |
391 | this._templateDocument.body.innerHTML = this._userDocument.content.body; | 391 | this._templateDocument.body.innerHTML = this._userDocument.content.body; |
392 | //TODO: Use querySelectorAll | ||
393 | var scripttags = this._templateDocument.html.getElementsByTagName('script'), webgldata; | ||
394 | // | ||
395 | for (var w in scripttags) { | ||
396 | if (scripttags[w].getAttribute) { | ||
397 | if (scripttags[w].getAttribute('data-ninja-webgl') !== null) { | ||
398 | //TODO: Add logic to handle more than one data tag | ||
399 | webgldata = JSON.parse((scripttags[w].innerHTML.replace("(", "")).replace(")", "")); | ||
400 | } | ||
401 | } | ||
402 | } | ||
403 | // | ||
404 | if (webgldata) { | ||
405 | for (var n=0; webgldata.data[n]; n++) { | ||
406 | webgldata.data[n] = unescape(webgldata.data[n]); | ||
407 | } | ||
408 | this._templateDocument.webgl = webgldata.data; | ||
409 | } | ||
410 | |||
392 | 411 | ||
393 | //Adding a handler for the main user document reel to finish loading | 412 | //Adding a handler for the main user document reel to finish loading |
394 | this._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); | 413 | this._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); |
@@ -502,6 +521,10 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
502 | 521 | ||
503 | this.callback(this); | 522 | this.callback(this); |
504 | 523 | ||
524 | //Setting webGL data | ||
525 | if (this._templateDocument.webgl) { | ||