easy-file-system 1.3.129 → 1.3.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example.js +577 -529
- package/lib/explorer.js +18 -1
- package/lib/item/entry/drag/directoryName.js +18 -3
- package/lib/item/entry/drag.js +2 -2
- package/lib/rubbishBin.js +19 -3
- package/package.json +2 -2
- package/src/explorer.js +19 -4
- package/src/item/entry/drag/directoryName.js +16 -3
- package/src/item/entry/drag.js +1 -1
- package/src/rubbishBin.js +17 -3
package/src/explorer.js
CHANGED
|
@@ -7,6 +7,7 @@ import { Element, eventTypes } from "easy";
|
|
|
7
7
|
import { asynchronousUtilities } from "necessary";
|
|
8
8
|
|
|
9
9
|
import EntriesList from "./list/entries";
|
|
10
|
+
import DragEntryItem from "./item/entry/drag";
|
|
10
11
|
import FileNameDragEntryItem from "./item/entry/drag/fileName";
|
|
11
12
|
import FileNameMarkerEntryItem from "./item/entry/marker/fileName";
|
|
12
13
|
import DirectoryNameDragEntryItem from "./item/entry/drag/directoryName";
|
|
@@ -31,8 +32,16 @@ class Explorer extends Element {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
dropHandler = (dragElement, aborted, element, done) => {
|
|
35
|
+
const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
|
|
36
|
+
|
|
37
|
+
if (!dragElementDragEntryItem) {
|
|
38
|
+
done();
|
|
39
|
+
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
34
43
|
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
35
|
-
|
|
44
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
36
45
|
|
|
37
46
|
if (aborted) {
|
|
38
47
|
markerEntryItemExplorer.removeMarker();
|
|
@@ -48,16 +57,22 @@ class Explorer extends Element {
|
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
dragOverHandler = (dragElement, element) => {
|
|
60
|
+
const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
|
|
61
|
+
|
|
62
|
+
if (!dragElementDragEntryItem) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
51
66
|
const dragEntryItem = dragElement, ///
|
|
52
|
-
|
|
53
|
-
|
|
67
|
+
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
68
|
+
dragEntryItemExplorerIgnored = this.isExplorerIgnored(dragEntryItemExplorer);
|
|
54
69
|
|
|
55
70
|
if (dragEntryItemExplorerIgnored) {
|
|
56
71
|
return;
|
|
57
72
|
}
|
|
58
73
|
|
|
59
74
|
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
60
|
-
|
|
75
|
+
dragEntryItemName = dragEntryItem.getName();
|
|
61
76
|
|
|
62
77
|
let markerEntryItemPath = markerEntryItem.getPath(),
|
|
63
78
|
markerEntryItemExplorer = markerEntryItem.getExplorer(),
|
|
@@ -13,7 +13,16 @@ import { FILE_NAME_DRAG_ENTRY_TYPE, FILE_NAME_MARKER_ENTRY_TYPE, DIRECTORY_NAME_
|
|
|
13
13
|
|
|
14
14
|
export default class DirectoryNameDragEntryItem extends DragEntryItem {
|
|
15
15
|
dropHandler = (dragElement, aborted, element, done) => {
|
|
16
|
-
const
|
|
16
|
+
const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
|
|
17
|
+
|
|
18
|
+
if (!dragElementDragEntryItem) {
|
|
19
|
+
done();
|
|
20
|
+
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const dragEntryItem = dragElement, ///
|
|
25
|
+
markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
17
26
|
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
18
27
|
|
|
19
28
|
if (aborted) {
|
|
@@ -24,12 +33,16 @@ export default class DirectoryNameDragEntryItem extends DragEntryItem {
|
|
|
24
33
|
return;
|
|
25
34
|
}
|
|
26
35
|
|
|
27
|
-
const dragEntryItem = dragElement; ///
|
|
28
|
-
|
|
29
36
|
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
dragOverHandler = (dragElement, element) => {
|
|
40
|
+
const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
|
|
41
|
+
|
|
42
|
+
if (!dragElementDragEntryItem) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
33
46
|
const collapsed = this.isCollapsed();
|
|
34
47
|
|
|
35
48
|
if (collapsed) {
|
package/src/item/entry/drag.js
CHANGED
package/src/rubbishBin.js
CHANGED
|
@@ -6,6 +6,7 @@ import { dropMixins } from "easy-drag-and-drop";
|
|
|
6
6
|
import { Element, eventTypes } from "easy";
|
|
7
7
|
import { asynchronousUtilities } from "necessary";
|
|
8
8
|
|
|
9
|
+
import DragEntryItem from "./item/entry/drag";
|
|
9
10
|
import OpenRubbishBinSVG from "./svg/rubbishBin/open";
|
|
10
11
|
import ClosedRubbishBinSVG from "./svg/rubbishBin/closed";
|
|
11
12
|
import FileNameMarkerEntryItem from "./item/entry/marker/fileName";
|
|
@@ -20,7 +21,16 @@ const { forEach } = asynchronousUtilities,
|
|
|
20
21
|
|
|
21
22
|
class RubbishBin extends Element {
|
|
22
23
|
dropHandler = (dragElement, aborted, element, done) => {
|
|
23
|
-
const
|
|
24
|
+
const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
|
|
25
|
+
|
|
26
|
+
if (!dragElementDragEntryItem) {
|
|
27
|
+
done();
|
|
28
|
+
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const dragEntryItem = dragElement, ///
|
|
33
|
+
markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
24
34
|
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
25
35
|
|
|
26
36
|
if (aborted) {
|
|
@@ -31,12 +41,16 @@ class RubbishBin extends Element {
|
|
|
31
41
|
return;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
const dragEntryItem = dragElement; ///
|
|
35
|
-
|
|
36
44
|
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
37
45
|
}
|
|
38
46
|
|
|
39
47
|
dragOverHandler = (dragElement, element) => {
|
|
48
|
+
const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
|
|
49
|
+
|
|
50
|
+
if (!dragElementDragEntryItem) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
40
54
|
const dragEntryItem = dragElement, ///
|
|
41
55
|
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
42
56
|
dragEntryItemExplorerIgnored = this.isExplorerIgnored(dragEntryItemExplorer);
|