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

ng-drag-to-reorder

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-drag-to-reorder - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

2

bower.json
{
"name": "ng-drag-to-reorder",
"main": "./ngDragToReorder.js",
"version": "1.0.2",
"version": "1.0.4",
"description": "Lightweight AngularJS directive for reordering any collection of elements using the HTML5 drag and drop API without any dependencies other than Angular. No jQuery!",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/mhthompson86/ng-drag-to-reorder",

@@ -55,4 +55,19 @@ (function () {

topOffset = 50, bottomOffset = 50, windowHeight, listHeight, slowScroll = false, fastScroll = false,
listScrollbar = false, listEl, listScroll = false, itemOffestTop, startY, listTopY;
listScrollbar = false, listEl, listScroll = false, itemOffestTop, startY, listTopY,
isChrome = !!window.chrome && !!window.chrome.webstore, isIE = !!document.documentMode,
isEdge = !isIE && !!window.StyleMedia, isFirefox = typeof InstallTrigger !== 'undefined',
isSafari = /constructor/i.test(window.HTMLElement) || (function (p) {
return p.toString() === "[object SafariRemoteNotification]";
})(!window['safari'] || safari.pushNotification);
if (isChrome)
console.log('Browser: Chrome');
if (isIE)
console.log('Browser: Internet Explorer');
if (isEdge)
console.log('Browser: Edge');
if (isFirefox)
console.log('Browser: Firefox');
if (isSafari)
console.log('Browser: Safari');

@@ -84,3 +99,4 @@ if (attrs.dtrEvent) {

el.addEventListener('drop', drop, false);
el.addEventListener('drag', drag, false);
if (isChrome || isIE || isEdge)
el.addEventListener('drag', drag, false);
}

@@ -99,3 +115,2 @@

function drag(e) {

@@ -151,3 +166,2 @@ if (listScrollbar) {

function scrollSlow(step) {
console.log('scroll slow');
window.scrollBy(0, step);

@@ -174,3 +188,3 @@ if (slowScroll)

}, 20)
} else console.log(listScroll, 'scroll list stop');
}
}

@@ -196,3 +210,2 @@

function dragEnd(e) {
console.log('drag end');
slowScroll = false;

@@ -199,0 +212,0 @@ fastScroll = false;

{
"name": "ng-drag-to-reorder",
"version": "1.0.2",
"version": "1.0.4",
"description": "Lightweight AngularJS drag and drop functionality to reorder lists without any dependencies other than Angular.",

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

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