electron-drag-drop
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -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, |
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29574
24
534
76
4
+ Addedlodash@^4.17.4
+ Addedlodash@4.17.21(transitive)