Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nativesortable

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativesortable - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

2

bower.json
{
"name": "nativesortable",
"main": "nativesortable.js",
"version": "0.0.1",
"version": "0.1.0",
"homepage": "http://bgrins.github.io/nativesortable",

@@ -6,0 +6,0 @@ "authors": [

/**
* nativesortable - v0.0.1
* nativesortable
*

@@ -31,6 +31,2 @@ * Originally based on code found here:

var CHILD_CLASS = "sortable-child";
var DRAGGING_CLASS = "sortable-dragging";
var OVER_CLASS = "sortable-over";
function hasClassName(el, name) {

@@ -129,2 +125,6 @@ return new RegExp("(?:^|\\s+)" + name + "(?:\\s+|$)").test(el.className);

var CHILD_CLASS = opts.childClass || "sortable-child";
var DRAGGING_CLASS = opts.draggingClass || "sortable-dragging";
var OVER_CLASS = opts.overClass || "sortable-over";
var currentlyDraggingElement = null;

@@ -168,3 +168,2 @@ var currentlyDraggingTarget = null;

var handleDragEnter = delegate(function(e) {
if (!currentlyDraggingElement || currentlyDraggingElement === this) {

@@ -191,3 +190,2 @@ return true;

var handleDragLeave = delegate(function(e) {
// Prevent dragenter on a child from allowing a dragleave on the container

@@ -222,7 +220,6 @@ var previousCounter = dragenterData(this);

}
change(this, currentlyDraggingElement);
});
var handleDragEnd = function(e) {
change(this,currentlyDraggingElement);

@@ -244,3 +241,2 @@ currentlyDraggingElement = null;

var handleTouchMove = delegate(function(e) {
if (!currentlyDraggingElement ||

@@ -247,0 +243,0 @@ currentlyDraggingElement === this ||

{
"name": "nativesortable",
"version": "0.0.1",
"version": "0.1.0",
"description": "use native drag and drop APIs to provide sortable items",

@@ -5,0 +5,0 @@ "main": "nativesortable.js",

@@ -9,5 +9,18 @@ An implementation of HTML5 Drag and Drop API to provide a sortable list of items.

var list = document.getElementByID("list");
nativesortable(list, { change: onchange });
var list = document.getElementById("list");
nativesortable(list, {
change: onchange,
childClass: "sortable-child",
draggingClass: "sortable-dragging",
overClass: "sortable-over"
});
## Package Management
bower install nativesortable
- or -
npm install nativesortable
## Extra CSS
I would also recommend adding the following CSS:

@@ -14,0 +27,0 @@

Sorry, the diff of this file is not supported yet

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