Skip to content

Commit b535892

Browse files
committed
Bump and build v6.1.0
1 parent 406c98c commit b535892

7 files changed

+43
-18
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#### v6.1.0
2+
3+
* **Features**
4+
* `Component.showIn` now supports passing `regionOptions`
5+
6+
* **Fixes**
7+
* When an app is stopped, the running events cache is now cleared correctly
8+
* `viewEvents` now works if a view is shown during `onBeforeShow`
9+
110
#### v6.0.1
211

312
* Add .npmignore

dist/marionette.toolkit.esm.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ var EventListenersMixin = {
621621
_.each(this._runningEvents, _.bind(function (args) {
622622
this.off.apply(this, args);
623623
}, this));
624+
625+
this._runningEvents = [];
624626
},
625627

626628
/**
@@ -633,6 +635,8 @@ var EventListenersMixin = {
633635
_.each(this._runningListeningTo, _.bind(function (args) {
634636
this.stopListening.apply(this, args);
635637
}, this));
638+
639+
this._runningListeningTo = [];
636640
},
637641

638642
/**
@@ -1231,15 +1235,18 @@ var App = Application.extend({
12311235
* @returns {View}
12321236
*/
12331237
showView: function showView() {
1234-
var _this$getRegion;
1235-
12361238
var view = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._view;
1239+
var region = this.getRegion();
12371240

12381241
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12391242
args[_key - 1] = arguments[_key];
12401243
}
12411244

1242-
(_this$getRegion = this.getRegion()).show.apply(_this$getRegion, [view].concat(args));
1245+
region.show.apply(region, [view].concat(args));
1246+
1247+
if (!this.isRunning()) {
1248+
this.setView(region.currentView);
1249+
}
12431250

12441251
return view;
12451252
},
@@ -1335,11 +1342,12 @@ var Component = Application.extend({
13351342
* @memberOf Component
13361343
* @param {Marionette.Region} region - The region for the component
13371344
* @param {Object} [viewOptions] - Options hash mixed into the instantiated ViewClass.
1345+
* @param {Object} [regionOptions] - Options hash mixed into the instantiated region.
13381346
* @returns {Component}
13391347
*/
1340-
showIn: function showIn(region, viewOptions) {
1348+
showIn: function showIn(region, viewOptions, regionOptions) {
13411349
this._region = region;
1342-
this.show(viewOptions);
1350+
this.show(viewOptions, regionOptions);
13431351
return this;
13441352
},
13451353

@@ -1527,7 +1535,7 @@ var Component = Application.extend({
15271535

15281536
_.extend(Component.prototype, StateMixin, ViewEventsMixin);
15291537

1530-
var version = "6.0.1";
1538+
var version = "6.1.0";
15311539

15321540
/**
15331541
* @module Toolkit

dist/marionette.toolkit.js

Lines changed: 15 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/marionette.toolkit.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/marionette.toolkit.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/marionette.toolkit.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "marionette.toolkit",
3-
"version": "6.0.1",
3+
"version": "6.1.0",
44
"description": "A collection of opinionated Backbone.Marionette extensions for large scale application architecture.",
55
"main": "dist/marionette.toolkit.js",
66
"module": "dist/marionette.toolkit.esm.js",

0 commit comments

Comments
 (0)