Socket
Socket
Sign inDemoInstall

electron-drag-drop

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-drag-drop - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

docs/drag.md

30

lib/drag.js

@@ -77,2 +77,5 @@ 'use strict';

/**
* @method end
*/
drag.end = function () {

@@ -88,2 +91,7 @@ _dragging = false;

/**
* @method updateDropEffect
* @param {DataTransfer} dataTransfer
* @param {string} dropEffect
*/
drag.updateDropEffect = function ( dataTransfer, dropEffect ) {

@@ -99,2 +107,6 @@ if ( ['copy', 'move', 'link', 'none'].indexOf(dropEffect) === -1 ) {

/**
* @method type
* @param {DataTransfer} dataTransfer
*/
drag.type = function ( dataTransfer ) {

@@ -125,2 +137,6 @@ if ( dataTransfer ) {

/**
* @method filterFiles
* @param {array} files
*/
drag.filterFiles = function ( files ) {

@@ -148,2 +164,6 @@ let results = [];

/**
* @method items
* @param {DataTransfer} dataTransfer
*/
drag.items = function ( dataTransfer ) {

@@ -180,2 +200,6 @@ if ( dataTransfer ) {

// NOTE: The image will be blur in retina, still not find a solution.
/**
* @method getDragIcon
* @param {array} items
*/
drag.getDragIcon = function (items) {

@@ -224,2 +248,5 @@ let icon = new Image();

/**
* @method options
*/
drag.options = function () {

@@ -229,2 +256,5 @@ return _.cloneDeep(_options);

/**
* @property {boolean} dragging
*/
Object.defineProperty(drag, 'dragging', {

@@ -231,0 +261,0 @@ enumerable: true,

2

lib/droppable.js

@@ -165,2 +165,3 @@ 'use strict';

target: event.target,
dataTransfer: event.dataTransfer,

@@ -172,3 +173,2 @@ clientX: event.clientX,

dataTransfer: event.dataTransfer,
dragType: drag.type(event.dataTransfer),

@@ -175,0 +175,0 @@ dragItems: drag.items(event.dataTransfer),

{
"name": "electron-drag-drop",
"version": "1.0.2",
"version": "1.0.3",
"description": "Easily manipulate drag and drop in Electron.",

@@ -33,4 +33,5 @@ "main": "index.js",

"electron-platform": "^1.2.0",
"lodash": "^4.17.4",
"path-plus": "^1.0.0"
}
}

@@ -8,3 +8,3 @@ # electron-drag-drop

TODO: Desc
Easily manipulate drag and drop in Electron.

@@ -28,2 +28,3 @@ ## Install

```javascript
// IMPORTANT: electron-drag-drop needs init in main process for broadcasting ipc messages.
// init drag-drop in main process

@@ -71,3 +72,4 @@ require('electron-drag-drop');

TODO
- [Module: drag (renderer process)](docs/drag.md)
- [Module: droppable (renderer process)](docs/droppable.md)

@@ -74,0 +76,0 @@ ## License

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