easy-file-system 2.1.224 → 2.1.225
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 +54 -54
- package/lib/div/item/entry/drag/directoryName.js +2 -2
- package/lib/div/item/entry/drag.js +2 -2
- package/lib/example/view.js +7 -7
- package/lib/explorer.js +25 -25
- package/lib/item/entry/drag/directoryName.js +4 -4
- package/lib/item/entry/drag/fileName.js +7 -7
- package/lib/item/entry/drag.js +6 -6
- package/lib/rubbishBin.js +6 -6
- package/lib/span/name.js +3 -3
- package/package.json +1 -1
- package/src/div/item/entry/drag/directoryName.js +1 -1
- package/src/div/item/entry/drag.js +1 -1
- package/src/example/view.js +6 -6
- package/src/explorer.js +24 -24
- package/src/item/entry/drag/directoryName.js +3 -3
- package/src/item/entry/drag/fileName.js +6 -6
- package/src/item/entry/drag.js +5 -5
- package/src/rubbishBin.js +5 -5
- package/src/span/name.js +2 -2
|
@@ -8,19 +8,19 @@ import { nameIsBeforeEntryItemName } from "../../../utilities/name";
|
|
|
8
8
|
import { FILE_NAME_DRAG_ENTRY_TYPE, DIRECTORY_NAME_DRAG_ENTRY_TYPE, FILE_NAME_MARKER_ENTRY_TYPE, DIRECTORY_NAME_MARKER_ENTRY_TYPE } from "../../../entryTypes";
|
|
9
9
|
|
|
10
10
|
export default class FileNameDragEntryItem extends DragEntryItem {
|
|
11
|
-
openFileNameDragEntryItem() {
|
|
11
|
+
openFileNameDragEntryItem(event, element) {
|
|
12
12
|
const explorer = this.getExplorer(),
|
|
13
13
|
fileNameDragEntryItem = this; ///
|
|
14
14
|
|
|
15
|
-
explorer.openFileNameDragEntryItem(fileNameDragEntryItem);
|
|
15
|
+
explorer.openFileNameDragEntryItem(event, element, fileNameDragEntryItem);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
doubleClick() {
|
|
19
|
-
this.openFileNameDragEntryItem();
|
|
18
|
+
doubleClick(event, element) {
|
|
19
|
+
this.openFileNameDragEntryItem(event, element);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
singleClick() {
|
|
23
|
-
this.openFileNameDragEntryItem();
|
|
22
|
+
singleClick(event, element) {
|
|
23
|
+
this.openFileNameDragEntryItem(event, element);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
isBefore(entryItem) {
|
package/src/item/entry/drag.js
CHANGED
|
@@ -28,14 +28,14 @@ class DragEntryItem extends EntryItem {
|
|
|
28
28
|
const dragEntryItem = this; ///
|
|
29
29
|
|
|
30
30
|
if (created) {
|
|
31
|
-
explorer.createDragEntryItem(dragEntryItem, () => {
|
|
31
|
+
explorer.createDragEntryItem(event, element, dragEntryItem, () => {
|
|
32
32
|
this.reset();
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
explorer.renameDragEntryItem(dragEntryItem, () => {
|
|
38
|
+
explorer.renameDragEntryItem(event, element, dragEntryItem, () => {
|
|
39
39
|
this.reset();
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -79,13 +79,13 @@ class DragEntryItem extends EntryItem {
|
|
|
79
79
|
|
|
80
80
|
const dragEntryItem = this; ///
|
|
81
81
|
|
|
82
|
-
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
82
|
+
markerEntryItemExplorer.dropDragEntryItem(event, element, dragEntryItem, done);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
click() {
|
|
85
|
+
click(event, element) {
|
|
86
86
|
const explorer = this.getExplorer(),
|
|
87
87
|
dragEntryItem = this, ///
|
|
88
|
-
selected = explorer.selectOrDeselectDragEntryItem(dragEntryItem);
|
|
88
|
+
selected = explorer.selectOrDeselectDragEntryItem(event, element, dragEntryItem);
|
|
89
89
|
|
|
90
90
|
return selected;
|
|
91
91
|
}
|
package/src/rubbishBin.js
CHANGED
|
@@ -52,7 +52,7 @@ class RubbishBin extends Element {
|
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
55
|
+
markerEntryItemExplorer.dropDragEntryItem(event, element, dragEntryItem, done);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
getReference() {
|
|
@@ -134,24 +134,24 @@ class RubbishBin extends Element {
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
dropDragEntryItem(dragEntryItem, done) {
|
|
137
|
+
dropDragEntryItem(event, element, dragEntryItem, done) {
|
|
138
138
|
const dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
139
139
|
sourceEntryPath = sourceEntryPathFromEntryItem(dragEntryItem),
|
|
140
140
|
targetEntryPath = null,
|
|
141
141
|
pathMaps = dragEntryItem.getPathMaps(sourceEntryPath, targetEntryPath),
|
|
142
142
|
explorer = dragEntryItemExplorer; ///
|
|
143
143
|
|
|
144
|
-
this.removeDragEntryItems(pathMaps, explorer, () => {
|
|
144
|
+
this.removeDragEntryItems(event, element, pathMaps, explorer, () => {
|
|
145
145
|
this.removeMarker();
|
|
146
146
|
|
|
147
147
|
done();
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
removeDragEntryItems(pathMaps, explorer, done) {
|
|
151
|
+
removeDragEntryItems(event, element, pathMaps, explorer, done) {
|
|
152
152
|
const customEventType = REMOVE_CUSTOM_EVENT_TYPE;
|
|
153
153
|
|
|
154
|
-
this.callCustomHandlersAsync(customEventType, pathMaps, explorer, () => {
|
|
154
|
+
this.callCustomHandlersAsync(customEventType, event, element, pathMaps, explorer, () => {
|
|
155
155
|
pathMaps.forEach((pathMap) => {
|
|
156
156
|
this.removeDragEntryItem(pathMap, explorer)
|
|
157
157
|
});
|
package/src/span/name.js
CHANGED
|
@@ -20,7 +20,7 @@ class NameSpan extends Element {
|
|
|
20
20
|
if (keyCode === ENTER_KEY_CODE) {
|
|
21
21
|
const customEventType = CHANGE_CUSTOM_EVENT_TYPE;
|
|
22
22
|
|
|
23
|
-
this.callCustomHandlers(customEventType);
|
|
23
|
+
this.callCustomHandlers(customEventType, event, element);
|
|
24
24
|
|
|
25
25
|
event.preventDefault();
|
|
26
26
|
}
|
|
@@ -28,7 +28,7 @@ class NameSpan extends Element {
|
|
|
28
28
|
if (keyCode === ESCAPE_KEY_CODE) {
|
|
29
29
|
const customEventType = CANCEL_CUSTOM_EVENT_TYPE;
|
|
30
30
|
|
|
31
|
-
this.callCustomHandlers(customEventType);
|
|
31
|
+
this.callCustomHandlers(customEventType, event, element);
|
|
32
32
|
|
|
33
33
|
event.preventDefault();
|
|
34
34
|
}
|