Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kiran committed Feb 11, 2015
1 parent 6c58276 commit 456ec32
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
19 changes: 19 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"esnext": true,
"strict": true,
"globalstrict": true,
"node": true,
"mocha": true,
"browser": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"undef": true,
"unused": true
}
20 changes: 2 additions & 18 deletions lib/default-props.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
var defaultProps = {
className: '',
accessibility: true,
// accessibility: true,
adaptiveHeight: false,
// appendArrows: $(element),
// appendDots: $(element),
arrows: true,
// asNavFor: null,
// prevArrow: '<button type="button" data-role="none" class="slick-prev">Previous</button>',
// nextArrow: '<button type="button" data-role="none" class="slick-next">Next</button>',
autoplay: false,
autoplaySpeed: 3000,
centerMode: false,
centerPadding: '50px',
cssEase: 'ease',
// customPaging: function(slider, i) {
// return '<button type="button" data-role="none">' + (i + 1) + '</button>';
// },
dots: false,
dotsClass: 'slick-dots',
draggable: true,
Expand All @@ -24,15 +16,7 @@ var defaultProps = {
focusOnSelect: false,
infinite: true,
initialSlide: 0,
lazyLoad: 'ondemand',
onBeforeChange: null,
onAfterChange: null,
onInit: null,
onReInit: null,
onSetPosition: null,
pauseOnHover: true,
pauseOnDotsHover: false,
respondTo: 'window',
// lazyLoad: 'ondemand',
responsive: null,
rtl: false,
slide: 'div',
Expand Down
3 changes: 1 addition & 2 deletions lib/mixins/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var helpers = {
getLeft: function (slideIndex) {
var slideOffset = 0;
var targetLeft;
var targetSlide;
if (this.props.infinite === true) {
if (this.state.slideCount > this.props.slidesToShow) {
slideOffset = (this.state.slideWidth * this.props.slidesToShow) * -1;
Expand All @@ -56,7 +57,6 @@ var helpers = {

if (this.props.variableWidth === true) {
var targetSlideIndex;
var totalSlides;
if(this.state.slideCount <= this.props.slidesToShow || this.props.infinite === false) {
targetSlide = this.refs.track.getDOMNode().childNodes[slideIndex];
} else {
Expand All @@ -82,7 +82,6 @@ var helpers = {
getAnimateCSS: function (targetLeft) {
var style = this.getCSS(targetLeft);
style.transition = 'transform 500ms ease';
// style.WebkitTransition = 'transform 500ms ease';
return style;
},
getCSS: function (targetLeft) {
Expand Down

0 comments on commit 456ec32

Please sign in to comment.