diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/color-controller.js | 4 | ||||
-rwxr-xr-x | js/controllers/document-controller.js | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js index a6e41dd3..53573baf 100755 --- a/js/controllers/color-controller.js +++ b/js/controllers/color-controller.js | |||
@@ -259,6 +259,7 @@ exports.ColorController = Montage.create(Component, { | |||
259 | //Radial gradient | 259 | //Radial gradient |
260 | gradient.stops = []; | 260 | gradient.stops = []; |
261 | gradient.mode = 'radial'; | 261 | gradient.mode = 'radial'; |
262 | gradient.gradientMode = 'radial'; | ||
262 | gradient.css = css; | 263 | gradient.css = css; |
263 | // | 264 | // |
264 | arr = css.split('%,'); | 265 | arr = css.split('%,'); |
@@ -284,6 +285,7 @@ exports.ColorController = Montage.create(Component, { | |||
284 | //Linear gradient | 285 | //Linear gradient |
285 | gradient.stops = []; | 286 | gradient.stops = []; |
286 | gradient.mode = 'linear'; | 287 | gradient.mode = 'linear'; |
288 | gradient.gradientMode = 'linear'; | ||
287 | gradient.css = css; | 289 | gradient.css = css; |
288 | // | 290 | // |
289 | arr = css.split('from('); | 291 | arr = css.split('from('); |
@@ -317,7 +319,7 @@ exports.ColorController = Montage.create(Component, { | |||
317 | } | 319 | } |
318 | } | 320 | } |
319 | //Creating gradient object | 321 | //Creating gradient object |
320 | color = {mode: 'gradient', value: {stops: gradient.stops, mode: gradient.mode, css: css}}; | 322 | color = {mode: 'gradient', value: {stops: gradient.stops, mode: gradient.mode, gradientMode: gradient.gradientMode, css: css}}; |
321 | } else if (css){ | 323 | } else if (css){ |
322 | //Simple solid color | 324 | //Simple solid color |
323 | color = this.parseCssToColor(css); | 325 | color = this.parseCssToColor(css); |
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 194496a6..a8056519 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -336,14 +336,23 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
336 | nextDocumentIndex = closeDocumentIndex - 1; | 336 | nextDocumentIndex = closeDocumentIndex - 1; |
337 | } | 337 | } |
338 | this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); | 338 | this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); |
339 | if(typeof this.activeDocument.stopVideos !== "undefined"){doc.stopVideos();} | ||
339 | this._removeDocumentView(doc.container); | 340 | this._removeDocumentView(doc.container); |
340 | }else if(this._documents.length === 0){ | 341 | }else if(this._documents.length === 0){ |
342 | if(typeof this.activeDocument.pauseAndStopVideos !== "undefined"){ | ||
343 | this.activeDocument.pauseAndStopVideos(); | ||
344 | } | ||
341 | this.activeDocument = null; | 345 | this.activeDocument = null; |
342 | this._removeDocumentView(doc.container); | 346 | this._removeDocumentView(doc.container); |
343 | this.application.ninja.stage.stageView.hideRulers(); | 347 | this.application.ninja.stage.stageView.hideRulers(); |
344 | document.getElementById("iframeContainer").style.display="block"; | 348 | document.getElementById("iframeContainer").style.display="block"; |
345 | 349 | ||
346 | this.application.ninja.stage.hideCanvas(true); | 350 | this.application.ninja.stage.hideCanvas(true); |
351 | }else{//closing inactive document tab - just clear DOM | ||
352 | if(typeof doc.pauseAndStopVideos !== "undefined"){ | ||
353 | doc.pauseAndStopVideos(); | ||
354 | } | ||
355 | this._removeDocumentView(doc.container); | ||
347 | } | 356 | } |
348 | 357 | ||
349 | NJevent("closeDocument", doc.uri); | 358 | NJevent("closeDocument", doc.uri); |