@antv/g-plugin-dragndrop 1.0.1

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/dist/index.js ADDED
@@ -0,0 +1,598 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var manaSyringe = require('mana-syringe');
6
+ var tslib = require('tslib');
7
+ var g = require('@antv/g');
8
+
9
+ function _regeneratorRuntime() {
10
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
11
+
12
+ _regeneratorRuntime = function () {
13
+ return exports;
14
+ };
15
+
16
+ var exports = {},
17
+ Op = Object.prototype,
18
+ hasOwn = Op.hasOwnProperty,
19
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
20
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
21
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
22
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
23
+
24
+ function define(obj, key, value) {
25
+ return Object.defineProperty(obj, key, {
26
+ value: value,
27
+ enumerable: !0,
28
+ configurable: !0,
29
+ writable: !0
30
+ }), obj[key];
31
+ }
32
+
33
+ try {
34
+ define({}, "");
35
+ } catch (err) {
36
+ define = function (obj, key, value) {
37
+ return obj[key] = value;
38
+ };
39
+ }
40
+
41
+ function wrap(innerFn, outerFn, self, tryLocsList) {
42
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
43
+ generator = Object.create(protoGenerator.prototype),
44
+ context = new Context(tryLocsList || []);
45
+ return generator._invoke = function (innerFn, self, context) {
46
+ var state = "suspendedStart";
47
+ return function (method, arg) {
48
+ if ("executing" === state) throw new Error("Generator is already running");
49
+
50
+ if ("completed" === state) {
51
+ if ("throw" === method) throw arg;
52
+ return doneResult();
53
+ }
54
+
55
+ for (context.method = method, context.arg = arg;;) {
56
+ var delegate = context.delegate;
57
+
58
+ if (delegate) {
59
+ var delegateResult = maybeInvokeDelegate(delegate, context);
60
+
61
+ if (delegateResult) {
62
+ if (delegateResult === ContinueSentinel) continue;
63
+ return delegateResult;
64
+ }
65
+ }
66
+
67
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
68
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
69
+ context.dispatchException(context.arg);
70
+ } else "return" === context.method && context.abrupt("return", context.arg);
71
+ state = "executing";
72
+ var record = tryCatch(innerFn, self, context);
73
+
74
+ if ("normal" === record.type) {
75
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
76
+ return {
77
+ value: record.arg,
78
+ done: context.done
79
+ };
80
+ }
81
+
82
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
83
+ }
84
+ };
85
+ }(innerFn, self, context), generator;
86
+ }
87
+
88
+ function tryCatch(fn, obj, arg) {
89
+ try {
90
+ return {
91
+ type: "normal",
92
+ arg: fn.call(obj, arg)
93
+ };
94
+ } catch (err) {
95
+ return {
96
+ type: "throw",
97
+ arg: err
98
+ };
99
+ }
100
+ }
101
+
102
+ exports.wrap = wrap;
103
+ var ContinueSentinel = {};
104
+
105
+ function Generator() {}
106
+
107
+ function GeneratorFunction() {}
108
+
109
+ function GeneratorFunctionPrototype() {}
110
+
111
+ var IteratorPrototype = {};
112
+ define(IteratorPrototype, iteratorSymbol, function () {
113
+ return this;
114
+ });
115
+ var getProto = Object.getPrototypeOf,
116
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
117
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
118
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
119
+
120
+ function defineIteratorMethods(prototype) {
121
+ ["next", "throw", "return"].forEach(function (method) {
122
+ define(prototype, method, function (arg) {
123
+ return this._invoke(method, arg);
124
+ });
125
+ });
126
+ }
127
+
128
+ function AsyncIterator(generator, PromiseImpl) {
129
+ function invoke(method, arg, resolve, reject) {
130
+ var record = tryCatch(generator[method], generator, arg);
131
+
132
+ if ("throw" !== record.type) {
133
+ var result = record.arg,
134
+ value = result.value;
135
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
136
+ invoke("next", value, resolve, reject);
137
+ }, function (err) {
138
+ invoke("throw", err, resolve, reject);
139
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
140
+ result.value = unwrapped, resolve(result);
141
+ }, function (error) {
142
+ return invoke("throw", error, resolve, reject);
143
+ });
144
+ }
145
+
146
+ reject(record.arg);
147
+ }
148
+
149
+ var previousPromise;
150
+
151
+ this._invoke = function (method, arg) {
152
+ function callInvokeWithMethodAndArg() {
153
+ return new PromiseImpl(function (resolve, reject) {
154
+ invoke(method, arg, resolve, reject);
155
+ });
156
+ }
157
+
158
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
159
+ };
160
+ }
161
+
162
+ function maybeInvokeDelegate(delegate, context) {
163
+ var method = delegate.iterator[context.method];
164
+
165
+ if (undefined === method) {
166
+ if (context.delegate = null, "throw" === context.method) {
167
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
168
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
169
+ }
170
+
171
+ return ContinueSentinel;
172
+ }
173
+
174
+ var record = tryCatch(method, delegate.iterator, context.arg);
175
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
176
+ var info = record.arg;
177
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
178
+ }
179
+
180
+ function pushTryEntry(locs) {
181
+ var entry = {
182
+ tryLoc: locs[0]
183
+ };
184
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
185
+ }
186
+
187
+ function resetTryEntry(entry) {
188
+ var record = entry.completion || {};
189
+ record.type = "normal", delete record.arg, entry.completion = record;
190
+ }
191
+
192
+ function Context(tryLocsList) {
193
+ this.tryEntries = [{
194
+ tryLoc: "root"
195
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
196
+ }
197
+
198
+ function values(iterable) {
199
+ if (iterable) {
200
+ var iteratorMethod = iterable[iteratorSymbol];
201
+ if (iteratorMethod) return iteratorMethod.call(iterable);
202
+ if ("function" == typeof iterable.next) return iterable;
203
+
204
+ if (!isNaN(iterable.length)) {
205
+ var i = -1,
206
+ next = function next() {
207
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
208
+
209
+ return next.value = undefined, next.done = !0, next;
210
+ };
211
+
212
+ return next.next = next;
213
+ }
214
+ }
215
+
216
+ return {
217
+ next: doneResult
218
+ };
219
+ }
220
+
221
+ function doneResult() {
222
+ return {
223
+ value: undefined,
224
+ done: !0
225
+ };
226
+ }
227
+
228
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
229
+ var ctor = "function" == typeof genFun && genFun.constructor;
230
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
231
+ }, exports.mark = function (genFun) {
232
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
233
+ }, exports.awrap = function (arg) {
234
+ return {
235
+ __await: arg
236
+ };
237
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
238
+ return this;
239
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
240
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
241
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
242
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
243
+ return result.done ? result.value : iter.next();
244
+ });
245
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
246
+ return this;
247
+ }), define(Gp, "toString", function () {
248
+ return "[object Generator]";
249
+ }), exports.keys = function (object) {
250
+ var keys = [];
251
+
252
+ for (var key in object) keys.push(key);
253
+
254
+ return keys.reverse(), function next() {
255
+ for (; keys.length;) {
256
+ var key = keys.pop();
257
+ if (key in object) return next.value = key, next.done = !1, next;
258
+ }
259
+
260
+ return next.done = !0, next;
261
+ };
262
+ }, exports.values = values, Context.prototype = {
263
+ constructor: Context,
264
+ reset: function (skipTempReset) {
265
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
266
+ },
267
+ stop: function () {
268
+ this.done = !0;
269
+ var rootRecord = this.tryEntries[0].completion;
270
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
271
+ return this.rval;
272
+ },
273
+ dispatchException: function (exception) {
274
+ if (this.done) throw exception;
275
+ var context = this;
276
+
277
+ function handle(loc, caught) {
278
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
279
+ }
280
+
281
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
282
+ var entry = this.tryEntries[i],
283
+ record = entry.completion;
284
+ if ("root" === entry.tryLoc) return handle("end");
285
+
286
+ if (entry.tryLoc <= this.prev) {
287
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
288
+ hasFinally = hasOwn.call(entry, "finallyLoc");
289
+
290
+ if (hasCatch && hasFinally) {
291
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
292
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
293
+ } else if (hasCatch) {
294
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
295
+ } else {
296
+ if (!hasFinally) throw new Error("try statement without catch or finally");
297
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
298
+ }
299
+ }
300
+ }
301
+ },
302
+ abrupt: function (type, arg) {
303
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
304
+ var entry = this.tryEntries[i];
305
+
306
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
307
+ var finallyEntry = entry;
308
+ break;
309
+ }
310
+ }
311
+
312
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
313
+ var record = finallyEntry ? finallyEntry.completion : {};
314
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
315
+ },
316
+ complete: function (record, afterLoc) {
317
+ if ("throw" === record.type) throw record.arg;
318
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
319
+ },
320
+ finish: function (finallyLoc) {
321
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
322
+ var entry = this.tryEntries[i];
323
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
324
+ }
325
+ },
326
+ catch: function (tryLoc) {
327
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
328
+ var entry = this.tryEntries[i];
329
+
330
+ if (entry.tryLoc === tryLoc) {
331
+ var record = entry.completion;
332
+
333
+ if ("throw" === record.type) {
334
+ var thrown = record.arg;
335
+ resetTryEntry(entry);
336
+ }
337
+
338
+ return thrown;
339
+ }
340
+ }
341
+
342
+ throw new Error("illegal catch attempt");
343
+ },
344
+ delegateYield: function (iterable, resultName, nextLoc) {
345
+ return this.delegate = {
346
+ iterator: values(iterable),
347
+ resultName: resultName,
348
+ nextLoc: nextLoc
349
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
350
+ }
351
+ }, exports;
352
+ }
353
+
354
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
355
+ try {
356
+ var info = gen[key](arg);
357
+ var value = info.value;
358
+ } catch (error) {
359
+ reject(error);
360
+ return;
361
+ }
362
+
363
+ if (info.done) {
364
+ resolve(value);
365
+ } else {
366
+ Promise.resolve(value).then(_next, _throw);
367
+ }
368
+ }
369
+
370
+ function _asyncToGenerator(fn) {
371
+ return function () {
372
+ var self = this,
373
+ args = arguments;
374
+ return new Promise(function (resolve, reject) {
375
+ var gen = fn.apply(self, args);
376
+
377
+ function _next(value) {
378
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
379
+ }
380
+
381
+ function _throw(err) {
382
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
383
+ }
384
+
385
+ _next(undefined);
386
+ });
387
+ };
388
+ }
389
+
390
+ function _extends() {
391
+ _extends = Object.assign || function (target) {
392
+ for (var i = 1; i < arguments.length; i++) {
393
+ var source = arguments[i];
394
+
395
+ for (var key in source) {
396
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
397
+ target[key] = source[key];
398
+ }
399
+ }
400
+ }
401
+
402
+ return target;
403
+ };
404
+
405
+ return _extends.apply(this, arguments);
406
+ }
407
+
408
+ var DragndropPluginOptions = manaSyringe.Syringe.defineToken('DragndropPluginOptions');
409
+
410
+ var _class;
411
+
412
+ var DragndropPlugin_1;
413
+ var DragndropPlugin = DragndropPlugin_1 = (_class = /*#__PURE__*/function () {
414
+ function DragndropPlugin() {
415
+ this.sceneGraphService = void 0;
416
+ this.renderingContext = void 0;
417
+ this.dragndropPluginOptions = void 0;
418
+ }
419
+
420
+ var _proto = DragndropPlugin.prototype;
421
+
422
+ _proto.apply = function apply(renderingService) {
423
+ var _this = this;
424
+
425
+ var document = this.renderingContext.root.ownerDocument;
426
+ var overlap = this.dragndropPluginOptions.overlap;
427
+
428
+ var handlePointerdown = function handlePointerdown(event) {
429
+ var target = event.target;
430
+
431
+ if (target.getAttribute('draggable')) {
432
+ // @ts-ignore
433
+ var moveAt = function moveAt(canvasX, canvasY) {
434
+ target.setPosition(canvasX - shiftX, canvasY - shiftY);
435
+ };
436
+
437
+ // @ts-ignore
438
+ var onMouseMove = /*#__PURE__*/function () {
439
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(event) {
440
+ var pointerEventsOldValue, point, elemBelow, droppableBelow;
441
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
442
+ while (1) {
443
+ switch (_context.prev = _context.next) {
444
+ case 0:
445
+ // @see https://developer.mozilla.org/zh-CN/docs/Web/API/Document/drag_event
446
+ event.type = 'drag';
447
+ target.dispatchEvent(event);
448
+ moveAt(event.canvasX, event.canvasY); // prevent from picking the dragging element
449
+
450
+ pointerEventsOldValue = target.style.pointerEvents;
451
+ target.style.pointerEvents = 'none';
452
+ point = overlap === 'pointer' ? [event.canvasX, event.canvasY] : target.getBounds().center;
453
+ _context.next = 8;
454
+ return document.elementFromPoint(point[0], point[1]);
455
+
456
+ case 8:
457
+ elemBelow = _context.sent;
458
+ target.style.pointerEvents = pointerEventsOldValue;
459
+
460
+ if (elemBelow) {
461
+ _context.next = 12;
462
+ break;
463
+ }
464
+
465
+ return _context.abrupt("return");
466
+
467
+ case 12:
468
+ droppableBelow = elemBelow.closest('[droppable=true]');
469
+
470
+ if (currentDroppable !== droppableBelow) {
471
+ if (currentDroppable) {
472
+ // null when we were not over a droppable before this event
473
+ // @see https://developer.mozilla.org/zh-CN/docs/Web/API/Document/dragleave_event
474
+ event.type = 'dragleave';
475
+ event.target = currentDroppable;
476
+ currentDroppable.dispatchEvent(event);
477
+ }
478
+
479
+ if (droppableBelow) {
480
+ // @see https://developer.mozilla.org/zh-CN/docs/Web/API/Document/dragleave_event
481
+ event.type = 'dragenter';
482
+ event.target = droppableBelow;
483
+ droppableBelow.dispatchEvent(event);
484
+ }
485
+
486
+ currentDroppable = droppableBelow;
487
+
488
+ if (currentDroppable) {
489
+ // null if we're not coming over a droppable now
490
+ // @see https://developer.mozilla.org/zh-CN/docs/Web/API/Document/dragover_event
491
+ event.type = 'dragover';
492
+ event.target = currentDroppable;
493
+ currentDroppable.dispatchEvent(event);
494
+ }
495
+ }
496
+
497
+ case 14:
498
+ case "end":
499
+ return _context.stop();
500
+ }
501
+ }
502
+ }, _callee);
503
+ }));
504
+
505
+ return function onMouseMove(_x) {
506
+ return _ref.apply(this, arguments);
507
+ };
508
+ }();
509
+
510
+ // @see https://developer.mozilla.org/zh-CN/docs/Web/API/Document/dragstart_event
511
+ event.type = 'dragstart';
512
+ target.dispatchEvent(event);
513
+ var shiftX = event.clientX - target.getBoundingClientRect().left;
514
+ var shiftY = event.clientY - target.getBoundingClientRect().top;
515
+ moveAt(event.canvasX, event.canvasY);
516
+ var currentDroppable = null;
517
+ document.addEventListener('pointermove', onMouseMove);
518
+ target.addEventListener('pointerup', function () {
519
+ // @see https://developer.mozilla.org/zh-CN/docs/Web/API/Document/dragend_event
520
+ event.type = 'dragend';
521
+ target.dispatchEvent(event);
522
+
523
+ if (currentDroppable) {
524
+ // @see https://developer.mozilla.org/zh-CN/docs/Web/API/Document/drop_event
525
+ event.type = 'drop';
526
+ event.target = currentDroppable;
527
+ currentDroppable.dispatchEvent(event);
528
+ }
529
+
530
+ document.removeEventListener('pointermove', onMouseMove);
531
+ }, {
532
+ once: true
533
+ });
534
+ }
535
+ };
536
+
537
+ renderingService.hooks.init.tapPromise(DragndropPlugin_1.tag, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
538
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
539
+ while (1) {
540
+ switch (_context2.prev = _context2.next) {
541
+ case 0:
542
+ _this.renderingContext.root.addEventListener('pointerdown', handlePointerdown);
543
+
544
+ case 1:
545
+ case "end":
546
+ return _context2.stop();
547
+ }
548
+ }
549
+ }, _callee2);
550
+ })));
551
+ renderingService.hooks.destroy.tap(DragndropPlugin_1.tag, function () {
552
+ _this.renderingContext.root.removeEventListener('pointerdown', handlePointerdown);
553
+ });
554
+ };
555
+
556
+ return DragndropPlugin;
557
+ }(), _class.tag = 'Dragndrop', _class);
558
+
559
+ tslib.__decorate([manaSyringe.inject(g.SceneGraphService), tslib.__metadata("design:type", Object)], DragndropPlugin.prototype, "sceneGraphService", void 0);
560
+
561
+ tslib.__decorate([manaSyringe.inject(g.RenderingContext), tslib.__metadata("design:type", Object)], DragndropPlugin.prototype, "renderingContext", void 0);
562
+
563
+ tslib.__decorate([manaSyringe.inject(DragndropPluginOptions), tslib.__metadata("design:type", Object)], DragndropPlugin.prototype, "dragndropPluginOptions", void 0);
564
+
565
+ DragndropPlugin = DragndropPlugin_1 = tslib.__decorate([manaSyringe.singleton({
566
+ contrib: g.RenderingPluginContribution
567
+ })], DragndropPlugin);
568
+
569
+ var containerModule = manaSyringe.Module(function (register) {
570
+ register(DragndropPlugin);
571
+ });
572
+ var Plugin = /*#__PURE__*/function () {
573
+ function Plugin(options) {
574
+ this.options = void 0;
575
+ this.name = 'dragndrop';
576
+ this.options = options;
577
+ }
578
+
579
+ var _proto = Plugin.prototype;
580
+
581
+ _proto.init = function init(container) {
582
+ container.register(DragndropPluginOptions, {
583
+ useValue: _extends({
584
+ overlap: 'pointer'
585
+ }, this.options)
586
+ });
587
+ container.load(containerModule, true);
588
+ };
589
+
590
+ _proto.destroy = function destroy(container) {
591
+ container.remove(DragndropPluginOptions);
592
+ container.unload(containerModule);
593
+ };
594
+
595
+ return Plugin;
596
+ }();
597
+
598
+ exports.Plugin = Plugin;