Skip to content

Commit

Permalink
Merge branch 'master' of github.com:baianat/hooper
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelrahman3d committed Feb 9, 2019
2 parents 6d6677b + 14e7ec5 commit 59ca4f5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ yarn add hooper
</slide>
...
</hooper>
<template>
</template>
<script>
import { Hooper, Slide } from 'hooper';
Expand Down Expand Up @@ -71,7 +71,7 @@ you can combine all settings in one object and pass it using `setting` prop
...
</hooper>
<template>
</template>
<script>
import { Hooper, Slide } from 'hooper';
Expand Down Expand Up @@ -110,7 +110,7 @@ you can pass an array of breaking points to the carousel settings, to specify a
...
</hooper>
<template>
</template>
<script>
import { Hooper, Slide } from 'hooper';
Expand Down Expand Up @@ -215,7 +215,7 @@ Available Addons:
<hooper-pagination slot="hooper-addons"></hooper-pagination>
<hooper-progress slot="hooper-addons"></hooper-progress>
</hooper>
<template>
</template>
<script>
import {
Expand Down
22 changes: 11 additions & 11 deletions src/Hooper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="hooper-list">
<ul
class="hooper-track"
:class="{ 'is-dragging': isDraging }"
:class="{ 'is-dragging': isDragging }"
ref="track"
@transitionend="onTransitionend"
:style="trackTransform"
Expand Down Expand Up @@ -97,12 +97,12 @@ export default {
},
// toggle mouse wheel sliding
wheelControl: {
default: true,
default: false,
type: Boolean
},
// toggle keyboard control
keysControl: {
default: true,
default: false,
type: Boolean
},
// enable any move to commit a slide
Expand Down Expand Up @@ -130,7 +130,7 @@ export default {
},
data () {
return {
isDraging: false,
isDragging: false,
isSliding: false,
isTouch: false,
isHover: false,
Expand Down Expand Up @@ -182,7 +182,7 @@ export default {
}
},
methods: {
// controling methods
// controlling methods
slideTo (slideIndex, mute = false) {
const previousSlide = this.currentSlide;
const index = this.$settings.infiniteScroll
Expand All @@ -205,7 +205,7 @@ export default {
this.isSliding = false;
}, this.$settings.transition);
// show the onrignal slide instead of the cloned one
// show the original slide instead of the cloned one
if (this.$settings.infiniteScroll) {
const temp = () => {
this.trackOffset = normalizeSlideIndex(this.currentSlide, this.slidesCount);
Expand Down Expand Up @@ -293,7 +293,7 @@ export default {
this.timer = new Timer(() => {
if (
this.isSliding ||
this.isDraging ||
this.isDragging ||
this.isHover ||
this.isFocus
) {
Expand Down Expand Up @@ -383,7 +383,7 @@ export default {
}
});
},
restartTiemr () {
restartTimer () {
if (this.timer) {
this.timer.restart();
}
Expand All @@ -398,7 +398,7 @@ export default {
this.startPosition = { x: 0, y: 0 };
this.endPosition = { x: 0, y: 0 };
this.isDraging = true;
this.isDragging = true;
this.startPosition.x = this.isTouch ? event.touches[0].clientX : event.clientX;
this.startPosition.y = this.isTouch ? event.touches[0].clientY : event.clientY;
Expand Down Expand Up @@ -431,7 +431,7 @@ export default {
const draggedSlides = Math.round(Math.abs(this.delta.x / this.slideWidth) + tolerance);
this.slideTo(this.currentSlide - direction * draggedSlides);
}
this.isDraging = false;
this.isDragging = false;
this.delta.x = 0;
this.delta.y = 0;
document.removeEventListener(
Expand All @@ -442,7 +442,7 @@ export default {
this.isTouch ? 'touchend' : 'mouseup',
this.onDragEnd
);
this.restartTiemr();
this.restartTimer();
},
onTransitionend () {
this.$refs.track.style.transition = '';
Expand Down
4 changes: 2 additions & 2 deletions src/addons/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ export default {
methods: {
slideNext () {
this.$hooper.slideNext();
this.$hooper.restartTiemr();
this.$hooper.restartTimer();
},
slidePrev () {
this.$hooper.slidePrev();
this.$hooper.restartTiemr();
this.$hooper.restartTimer();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/addons/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<script>
export default {
inject: ['$hooper'],
name: 'HooperPaginaiton',
name: 'HooperPagination',
props: {
mode: {
default: 'indicator',
Expand Down

0 comments on commit 59ca4f5

Please sign in to comment.