You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

drop-component

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drop-component - npm Package Compare versions

Comparing version
0.1.4
to
0.1.5
+2
-2
component.json

@@ -5,3 +5,3 @@ {

"description": "drag and drop uploads with a single event per drop",
"version": "0.1.4",
"version": "0.1.5",
"keywords": [

@@ -16,3 +16,3 @@ "drag",

"component/events": "*",
"component/normalized-upload": "0.0.5"
"component/normalized-upload": "*"
},

@@ -19,0 +19,0 @@ "development": {},

@@ -17,6 +17,11 @@ <html>

}
#drop.over div {
background: red;
}
</style>
</head>
<body>
<div id="drop"></div>
<div id="drop">
<div>I'm a child node!</div>
</div>
<script src="build/build.js"></script>

@@ -23,0 +28,0 @@ <script>

0.1.4 / 2013-04-29
0.1.5 / 2013-12-12
==================
* example: add a child node for testing
* update deps
* do manual bookkeeping to only add/remove "over" class on outer element
* add repository field to package.json
0.1.2 / 2013-04-29
0.1.4 / 2013-04-29
==================

@@ -12,10 +15,15 @@

0.1.0 / 2013-04-26
0.1.2 / 2013-04-29
==================
* update deps
0.1.0 / 2013-04-26
==================
* refactor with normalized-upload module
0.0.1 / 2013-04-25
0.0.1 / 2013-04-25
==================
* Initial release
* Initial release

@@ -35,2 +35,8 @@

this.events.bind('dragover');
// HTML5 "dragenter" and "dragleave" events kinda suck... since they get fired
// even for child nodes within the target droppable element, we need to do some
// additional bookkeeping to only add/remove the "over" class on the real target
this.first = false;
this.second = false;
}

@@ -53,3 +59,8 @@

Drop.prototype.ondragenter = function(e){
this.classes.add('over');
if (this.first) {
this.second = true;
} else {
this.first = true;
this.classes.add('over');
}
};

@@ -70,3 +81,10 @@

Drop.prototype.ondragleave = function(e){
this.classes.remove('over');
if (this.second) {
this.second = false;
} else if (this.first) {
this.first = false;
}
if (!this.first && !this.second) {
this.classes.remove('over');
}
};

@@ -84,2 +102,1 @@

};
{
"name": "drop-component",
"description": "drag and drop file uploading with a single drop event",
"version": "0.1.4",
"keywords": ["upload", "file"],
"version": "0.1.5",
"keywords": [
"upload",
"file"
],
"dependencies": {
"classes-component": "*",
"events-component-2": "*",
"normalized-upload": "0.x"
"normalized-upload": "*"
},

@@ -15,3 +18,11 @@ "component": {

}
},
"browser": {
"classes": "classes-component",
"events": "events-component-2"
},
"repository": {
"type": "git",
"url": "https://github.com/component/drop.git"
}
}