easy-file-system 1.5.27 → 1.5.30

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/src/explorer.js CHANGED
@@ -261,9 +261,10 @@ class Explorer extends Element {
261
261
  const path = this.createPath(),
262
262
  created = true,
263
263
  filePath = path, ///
264
+ callHandlers = false,
264
265
  fileNameDragEntryItem = this.addFilePath(filePath, created);
265
266
 
266
- this.selectDragEntryItem(fileNameDragEntryItem);
267
+ this.selectDragEntryItem(fileNameDragEntryItem, callHandlers);
267
268
 
268
269
  this.editSelectedPath();
269
270
  }
@@ -272,10 +273,11 @@ class Explorer extends Element {
272
273
  const path = this.createPath(),
273
274
  created = true,
274
275
  collapsed = false,
276
+ callHandlers = false,
275
277
  directoryPath = path, ///
276
278
  directoryNameDragEntryItem = this.addDirectoryPath(directoryPath, collapsed, created);
277
279
 
278
- this.selectDragEntryItem(directoryNameDragEntryItem);
280
+ this.selectDragEntryItem(directoryNameDragEntryItem, callHandlers);
279
281
 
280
282
  this.editSelectedPath();
281
283
  }
@@ -288,7 +290,7 @@ class Explorer extends Element {
288
290
  }
289
291
  }
290
292
 
291
- selectDragEntryItem(dragEntryItem) {
293
+ selectDragEntryItem(dragEntryItem, callHandlers = true) {
292
294
  const path = dragEntryItem.getPath();
293
295
 
294
296
  let selected = dragEntryItem.isSelected();
@@ -301,9 +303,11 @@ class Explorer extends Element {
301
303
  this.selectPath(path);
302
304
  }
303
305
 
304
- selected = !selected; ///
306
+ if (callHandlers) {
307
+ selected = !selected; ///
305
308
 
306
- this.callSelectHandlers(path, selected);
309
+ this.callSelectHandlers(path, selected);
310
+ }
307
311
  }
308
312
 
309
313
  renameDragEntryItem(dragEntryItem, done) {
@@ -199,6 +199,7 @@ class DragEntryItem extends EntryItem {
199
199
  this.setNameInputName(nameInputName);
200
200
 
201
201
  this.showNameButton();
202
+
202
203
  this.hideNameInput();
203
204
  }
204
205
 
@@ -195,8 +195,6 @@ class EntriesList extends Element {
195
195
  directoryNameDragEntryItem = this.findDirectoryNameDragEntryItem(directoryName);
196
196
 
197
197
  if (directoryNameDragEntryItem === null) {
198
- const created = false;
199
-
200
198
  directoryNameDragEntryItem = this.createDirectoryNameDragEntryItem(directoryName, collapsed, created);
201
199
 
202
200
  this.addEntryItem(directoryNameDragEntryItem);
@@ -209,6 +207,8 @@ class EntriesList extends Element {
209
207
  let topmostDirectoryNameDragEntryItem = this.findDirectoryNameDragEntryItem(topmostDirectoryName);
210
208
 
211
209
  if (topmostDirectoryNameDragEntryItem === null) {
210
+ const created = false;
211
+
212
212
  topmostDirectoryNameDragEntryItem = this.createDirectoryNameDragEntryItem(topmostDirectoryName, collapsed, created);
213
213
 
214
214
  this.addEntryItem(topmostDirectoryNameDragEntryItem);