forked from ReDEnergy/SessionSync
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrag-context.js
More file actions
46 lines (33 loc) · 923 Bytes
/
Copy pathdrag-context.js
File metadata and controls
46 lines (33 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
define(function(require, exports) {
'use strict';
// *****************************************************************************
// Custom Modules
const { WindowEvents } = require('./global-events');
// *****************************************************************************
// API
var DragContext = (function DragContext() {
var context = null;
function setContext(ctx) {
context = ctx;
WindowEvents.emit(document, 'TrashCan-Droppable', ctx != null);
}
function getContext() {
return context;
}
function hasContext() {
return context != null;
}
function clearContext() {
setContext(null);
}
return {
hasContext: hasContext,
clearContext: clearContext,
setContext: setContext,
getContext: getContext
};
})();
// *****************************************************************************
// Public API
exports.DragContext = DragContext;
});