New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dotslider

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotslider - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

30

lib/navigator.js

@@ -38,13 +38,19 @@ 'use strict';

var onMouseLeave = _props.onMouseLeave;
var onTouchEnd = _props.onTouchEnd;
var props = {
onClick: this.props.onClick.bind(null, index + 1),
className: this.isActive(index, children) ? 'active' : ''
className: this.isActive(index, children) ? 'active' : '',
active: this.isActive(index, children),
onTouchStart: this.props.onClick.bind(null, index + 1)
};
if (onMouseOver && onMouseLeave) {
props.onMouseOver = onMouseOver;
if (onMouseLeave) {
props.onMouseLeave = onMouseLeave;
}
if (onTouchEnd) {
props.onTouchEnd = onTouchEnd;
}
return props;

@@ -86,2 +92,4 @@ }

value: function render() {
var className = 'dotslider-navigation';
if (this.props.useDefault) {

@@ -91,7 +99,5 @@ return this.renderDefaultNavigator();

return _react2.default.createElement(
'div',
{ className: 'dotslider-navigation' },
this.renderChildren()
);
className = this.props.className ? className += ' ' + this.props.className : className;
return _react2.default.createElement(this.props.el, { className: className }, this.renderChildren());
}

@@ -103,2 +109,8 @@ }]);

exports.default = Navigator;
// Default Props
exports.default = Navigator;
Navigator.defaultProps = {
el: 'div'
};

@@ -77,4 +77,9 @@ 'use strict';

value: function handleMouseLeave() {
this.stopAnimation = false;
this.startAnimationLoop();
this.stopAnimationLoop();
if (this.state.isAnimating) {
this.setState({ isAnimating: false });
} else {
this.startAnimationLoop();
}
}

@@ -102,5 +107,8 @@ }, {

_this2.goToSlide(number);
// this.handleMouseOver();
},
getActive: this.getActive,
totalChildren: this.getChildrenCount()
totalChildren: this.getChildrenCount(),
onMouseLeave: this.handleMouseLeave,
onTouchEnd: this.handleMouseLeave
};

@@ -230,6 +238,2 @@

if (this.__timeout) {
clearTimeout(this.__timeout);
}
active = number;

@@ -360,2 +364,3 @@

var dragged = this.state.dragged;
if (this.touched && dragged) {

@@ -398,5 +403,3 @@ if (this.touchStartPosition > dragged) {

this.stopAnimation = false;
if (this.touched) {
return;
}
// if(this.touched) { return; }
this.startAnimationLoop();

@@ -403,0 +406,0 @@ }

{
"name": "dotslider",
"version": "0.1.1",
"version": "0.1.2",
"description": "Zero effort slider / carousel component in pure react with zero dependencies",

@@ -5,0 +5,0 @@ "main": "./lib/entry.dist.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc