Skip to content

Commit

Permalink
chore(): Bump v3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jedrzejchalubek committed Apr 20, 2019
1 parent 15b92ec commit 593ad78
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 39 deletions.
38 changes: 26 additions & 12 deletions dist/glide.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Glide.js v3.2.7
* Glide.js v3.3.0
* (c) 2013-2019 Jędrzej Chałubek <jedrzej.chalubek@gmail.com> (http://jedrzejchalubek.com/)
* Released under the MIT License.
*/
Expand Down Expand Up @@ -909,6 +909,14 @@ function Run (Glide, Components, Events) {
Events.emit('run', this.move);

Components.Transition.after(function () {
if (_this.isStart()) {
Events.emit('run.start', _this.move);
}

if (_this.isEnd()) {
Events.emit('run.end', _this.move);
}

if (_this.isOffset('<') || _this.isOffset('>')) {
_this._o = false;

Expand Down Expand Up @@ -947,8 +955,6 @@ function Run (Glide, Components, Events) {

Glide.index = 0;
}

Events.emit('run.end', move);
} else if (countableSteps) {
Glide.index += Math.min(length - Glide.index, -toInt(steps));
} else {
Expand All @@ -965,8 +971,6 @@ function Run (Glide, Components, Events) {

Glide.index = length;
}

Events.emit('run.start', move);
} else if (countableSteps) {
Glide.index -= Math.min(Glide.index, toInt(steps));
} else {
Expand All @@ -977,6 +981,10 @@ function Run (Glide, Components, Events) {
case '=':
Glide.index = steps;
break;

default:
warn('Invalid direction pattern [' + direction + steps + '] has been used');
break;
}
},

Expand Down Expand Up @@ -1029,9 +1037,11 @@ function Run (Glide, Components, Events) {
* @returns {Object}
*/
set: function set(value) {
var step = value.substr(1);

this._m = {
direction: value.substr(0, 1),
steps: value.substr(1) ? value.substr(1) : 0
steps: step ? toInt(step) ? toInt(step) : step : 0
};
}
});
Expand Down Expand Up @@ -3145,11 +3155,13 @@ function Controls (Glide, Components, Events) {
var settings = Glide.settings;
var item = controls[Glide.index];

item.classList.add(settings.classes.activeNav);
if (item) {
item.classList.add(settings.classes.activeNav);

siblings(item).forEach(function (sibling) {
sibling.classList.remove(settings.classes.activeNav);
});
siblings(item).forEach(function (sibling) {
sibling.classList.remove(settings.classes.activeNav);
});
}
},


Expand All @@ -3160,8 +3172,10 @@ function Controls (Glide, Components, Events) {
* @return {Void}
*/
removeClass: function removeClass(controls) {
if (controls[Glide.index]) {
controls[Glide.index].classList.remove(Glide.settings.classes.activeNav);
var item = controls[Glide.index];

if (item) {
item.classList.remove(Glide.settings.classes.activeNav);
}
},

Expand Down
38 changes: 26 additions & 12 deletions dist/glide.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Glide.js v3.2.7
* Glide.js v3.3.0
* (c) 2013-2019 Jędrzej Chałubek <jedrzej.chalubek@gmail.com> (http://jedrzejchalubek.com/)
* Released under the MIT License.
*/
Expand Down Expand Up @@ -915,6 +915,14 @@
Events.emit('run', this.move);

Components.Transition.after(function () {
if (_this.isStart()) {
Events.emit('run.start', _this.move);
}

if (_this.isEnd()) {
Events.emit('run.end', _this.move);
}

if (_this.isOffset('<') || _this.isOffset('>')) {
_this._o = false;

Expand Down Expand Up @@ -953,8 +961,6 @@

Glide.index = 0;
}

Events.emit('run.end', move);
} else if (countableSteps) {
Glide.index += Math.min(length - Glide.index, -toInt(steps));
} else {
Expand All @@ -971,8 +977,6 @@

Glide.index = length;
}

Events.emit('run.start', move);
} else if (countableSteps) {
Glide.index -= Math.min(Glide.index, toInt(steps));
} else {
Expand All @@ -983,6 +987,10 @@
case '=':
Glide.index = steps;
break;

default:
warn('Invalid direction pattern [' + direction + steps + '] has been used');
break;
}
},

Expand Down Expand Up @@ -1035,9 +1043,11 @@
* @returns {Object}
*/
set: function set(value) {
var step = value.substr(1);

this._m = {
direction: value.substr(0, 1),
steps: value.substr(1) ? value.substr(1) : 0
steps: step ? toInt(step) ? toInt(step) : step : 0
};
}
});
Expand Down Expand Up @@ -3151,11 +3161,13 @@
var settings = Glide.settings;
var item = controls[Glide.index];

item.classList.add(settings.classes.activeNav);
if (item) {
item.classList.add(settings.classes.activeNav);

siblings(item).forEach(function (sibling) {
sibling.classList.remove(settings.classes.activeNav);
});
siblings(item).forEach(function (sibling) {
sibling.classList.remove(settings.classes.activeNav);
});
}
},


Expand All @@ -3166,8 +3178,10 @@
* @return {Void}
*/
removeClass: function removeClass(controls) {
if (controls[Glide.index]) {
controls[Glide.index].classList.remove(Glide.settings.classes.activeNav);
var item = controls[Glide.index];

if (item) {
item.classList.remove(Glide.settings.classes.activeNav);
}
},

Expand Down
Loading

0 comments on commit 593ad78

Please sign in to comment.