diff options
-rwxr-xr-x | js/controllers/document-controller.js | 6 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 13 | ||||
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 1c9d9d59..843db87c 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -169,6 +169,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
169 | value:function(doc){ | 169 | value:function(doc){ |
170 | var response = doc || null;//default just for testing | 170 | var response = doc || null;//default just for testing |
171 | if(!!response && response.success && (response.status!== 500) && !!response.uri){ | 171 | if(!!response && response.success && (response.status!== 500) && !!response.uri){ |
172 | this.creatingNewFile = true;//flag for timeline to identify new file flow | ||
172 | this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this)); | 173 | this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this)); |
173 | }else if(!!response && !response.success){ | 174 | }else if(!!response && !response.success){ |
174 | //Todo: restrict directory path to the sandbox, in the dialog itself | 175 | //Todo: restrict directory path to the sandbox, in the dialog itself |
@@ -196,6 +197,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
196 | value:function(response){ | 197 | value:function(response){ |
197 | //TODO: Add UI to handle error codes, shouldn't be alert windows | 198 | //TODO: Add UI to handle error codes, shouldn't be alert windows |
198 | if(!!response && (response.status === 204)) { | 199 | if(!!response && (response.status === 204)) { |
200 | |||
201 | if((typeof this.creatingNewFile === 'undefined') || (this.creatingNewFile !== true)){//not from new file flow | ||
202 | this.creatingNewFile = false; | ||
203 | } | ||
204 | |||
199 | //Sending full response object | 205 | //Sending full response object |
200 | this.openDocument(response); | 206 | this.openDocument(response); |
201 | } else if (!!response && (response.status === 404)){ | 207 | } else if (!!response && (response.status === 404)){ |
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index a5cde00f..5f484cdb 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -318,6 +318,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
318 | value:function (event) { | 318 | value:function (event) { |
319 | this._isLayer = true; | 319 | this._isLayer = true; |
320 | this.needsDraw = true; | 320 | this.needsDraw = true; |
321 | this.application.ninja.selectionController.executeSelectElement(); | ||
321 | } | 322 | } |
322 | }, | 323 | }, |
323 | 324 | ||
@@ -499,7 +500,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
499 | this.arrTracks.splice(myIndex, 0, newTrack); | 500 | this.arrTracks.splice(myIndex, 0, newTrack); |
500 | this.arrLayers.splice(myIndex, 0, thingToPush); | 501 | this.arrLayers.splice(myIndex, 0, thingToPush); |
501 | this._LayerUndoPosition = myIndex; | 502 | this._LayerUndoPosition = myIndex; |
502 | // this.selectLayer(myIndex); | 503 | this.selectLayer(myIndex); |
503 | this.hashLayerNumber.setItem(this._hashKey, thingToPush); | 504 | this.hashLayerNumber.setItem(this._hashKey, thingToPush); |
504 | this.hashInstance.setItem(this._hashKey, thingToPush, myIndex); | 505 | this.hashInstance.setItem(this._hashKey, thingToPush, myIndex); |
505 | this.hashTrackInstance.setItem(this._hashKey, newTrack, myIndex); | 506 | this.hashTrackInstance.setItem(this._hashKey, newTrack, myIndex); |
@@ -512,16 +513,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
512 | this.hashLayerNumber.setItem(this._hashKey, thingToPush); | 513 | this.hashLayerNumber.setItem(this._hashKey, thingToPush); |
513 | this.hashInstance.setItem(this._hashKey, thingToPush, thingToPush.layerPosition); | 514 | this.hashInstance.setItem(this._hashKey, thingToPush, thingToPush.layerPosition); |
514 | this.hashTrackInstance.setItem(this._hashKey, newTrack, newTrack.trackPosition); | 515 | this.hashTrackInstance.setItem(this._hashKey, newTrack, newTrack.trackPosition); |
515 | // this.selectLayer(0); | 516 | this.selectLayer(0); |
516 | 517 | ||
517 | } | 518 | } |
518 | this._LayerUndoObject = thingToPush; | 519 | this._LayerUndoObject = thingToPush; |
519 | this._LayerUndoIndex = thingToPush.layerID; | 520 | this._LayerUndoIndex = thingToPush.layerID; |
520 | this._LayerUndoStatus = true; | 521 | this._LayerUndoStatus = true; |
521 | this._TrackUndoObject = newTrack; | 522 | this._TrackUndoObject = newTrack; |
522 | // if(_firstLayerDraw){ | 523 | |
523 | // this.application.ninja.selectionController.executeSelectElement(); | ||
524 | // } | ||
525 | 524 | ||
526 | } | 525 | } |
527 | } | 526 | } |
@@ -846,10 +845,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
846 | this.trackRepetition.selectedIndexes = [layerIndex]; | 845 | this.trackRepetition.selectedIndexes = [layerIndex]; |
847 | this.currentLayerSelected = this.arrLayers[layerIndex]; | 846 | this.currentLayerSelected = this.arrLayers[layerIndex]; |
848 | this.currentTrackSelected = this.arrTracks[layerIndex]; | 847 | this.currentTrackSelected = this.arrTracks[layerIndex]; |
849 | /*if(this._captureSelection){ | ||
850 | this.application.ninja.selectionController.selectElements(this.currentLayerSelected.elementsList) | ||
851 | }*/ | ||
852 | this._captureSelection = true; | ||
853 | } else { | 848 | } else { |
854 | this.layerRepetition.selectedIndexes = null; | 849 | this.layerRepetition.selectedIndexes = null; |
855 | this.trackRepetition.selectedIndexes = null; | 850 | this.trackRepetition.selectedIndexes = null; |
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index dc9980f0..c6427317 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js | |||
@@ -149,6 +149,8 @@ exports.StageView = Montage.create(Component, { | |||
149 | // appDelegateModule.MyAppDelegate.onSetActiveDocument(); | 149 | // appDelegateModule.MyAppDelegate.onSetActiveDocument(); |
150 | } | 150 | } |
151 | 151 | ||
152 | NJevent("switchDocument"); | ||
153 | |||
152 | } | 154 | } |
153 | }, | 155 | }, |
154 | 156 | ||