aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/document-controller.js9
-rwxr-xr-xjs/mediators/keyboard-mediator.js6
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js10
-rwxr-xr-xjs/panels/properties/content.reel/content.js15
4 files changed, 30 insertions, 10 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index fa611de4..1c9d9d59 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -84,8 +84,13 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
84 // 84 //
85 handleAppLoaded: { 85 handleAppLoaded: {
86 value: function() { 86 value: function() {
87 //Adding an intercept to resources loaded to ensure user assets load from cloud simulator 87 //Checking for app to be loaded through extension
88 if (window.chrome.app.isInstalled) { 88 var check;
89 if (chrome && chrome.app) {
90 check = chrome.app.getDetails();
91 }
92 if (check !== null) {
93 //Adding an intercept to resources loaded to ensure user assets load from cloud simulator
89 chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]); 94 chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]);
90 } 95 }
91 } 96 }
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js
index 0282060f..a4bf9baa 100755
--- a/js/mediators/keyboard-mediator.js
+++ b/js/mediators/keyboard-mediator.js
@@ -162,15 +162,17 @@ exports.KeyboardMediator = Montage.create(Component, {
162 return; 162 return;
163 } 163 }
164 164
165 // Hand tool
165 if(evt.keyCode === Keyboard.H ) { 166 if(evt.keyCode === Keyboard.H ) {
166 evt.preventDefault(); 167 evt.preventDefault();
167 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); 168 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]});
168 return; 169 return;
169 } 170 }
170 171
172 // Zoom tool
171 if(evt.keyCode === Keyboard.Z ) { 173 if(evt.keyCode === Keyboard.Z ) {
172 evt.preventDefault(); 174 evt.preventDefault();
173 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[16]}); 175 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]});
174 return; 176 return;
175 } 177 }
176 178
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 1a0b9e80..62ae625f 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -513,9 +513,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
513 this._LayerUndoIndex = thingToPush.layerID; 513 this._LayerUndoIndex = thingToPush.layerID;
514 this._LayerUndoStatus = true; 514 this._LayerUndoStatus = true;
515 this._TrackUndoObject = newTrack; 515 this._TrackUndoObject = newTrack;
516 if(_firstLayerDraw){ 516// if(_firstLayerDraw){
517 this.application.ninja.selectionController.executeSelectElement(); 517// this.application.ninja.selectionController.executeSelectElement();
518 } 518// }
519 519
520 } 520 }
521 } 521 }
@@ -840,9 +840,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
840 this.trackRepetition.selectedIndexes = [layerIndex]; 840 this.trackRepetition.selectedIndexes = [layerIndex];
841 this.currentLayerSelected = this.arrLayers[layerIndex]; 841 this.currentLayerSelected = this.arrLayers[layerIndex];
842 this.currentTrackSelected = this.arrTracks[layerIndex]; 842 this.currentTrackSelected = this.arrTracks[layerIndex];
843 if(this._captureSelection){ 843 /*if(this._captureSelection){
844 this.application.ninja.selectionController.selectElements(this.currentLayerSelected.elementsList) 844 this.application.ninja.selectionController.selectElements(this.currentLayerSelected.elementsList)
845 } 845 }*/
846 this._captureSelection = true; 846 this._captureSelection = true;
847 } else { 847 } else {
848 this.layerRepetition.selectedIndexes = null; 848 this.layerRepetition.selectedIndexes = null;
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js
index 9b6416c7..8fa33a75 100755
--- a/js/panels/properties/content.reel/content.js
+++ b/js/panels/properties/content.reel/content.js
@@ -255,6 +255,12 @@ exports.Content = Montage.create(Component, {
255 255
256 if(currentValue) 256 if(currentValue)
257 { 257 {
258 if(currentValue.color)
259 {
260 currentValue.color.wasSetByCode = true;
261 currentValue.color.type = "change";
262 }
263
258 if(currentValue.mode === "gradient") 264 if(currentValue.mode === "gradient")
259 { 265 {
260 this.application.ninja.colorController.colorModel["gradient"] = 266 this.application.ninja.colorController.colorModel["gradient"] =
@@ -267,7 +273,14 @@ exports.Content = Montage.create(Component, {
267 this.application.ninja.colorController.colorModel.alpha = 273 this.application.ninja.colorController.colorModel.alpha =
268 {value: currentValue.color.a, wasSetByCode: true, type: 'change'}; 274 {value: currentValue.color.a, wasSetByCode: true, type: 'change'};
269 } 275 }
270 this.application.ninja.colorController.colorModel[currentValue.color.mode] = currentValue.color; 276 if(currentValue.color.mode)
277 {
278 this.application.ninja.colorController.colorModel[currentValue.color.mode] = currentValue.color;
279 }
280 else
281 {
282 this.application.ninja.colorController.colorModel["rgb"] = currentValue.color;
283 }
271 } 284 }
272 } 285 }
273 else 286 else