force-graph 1.43.3 → 1.43.5
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/README.md +1 -0
- package/dist/force-graph.js +137 -143
- package/dist/force-graph.js.map +1 -1
- package/dist/force-graph.min.js +3 -3
- package/dist/force-graph.mjs +69 -85
- package/example/beeswarm/index.html +40 -0
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ And check out the [React bindings](https://github.com/vasturiano/react-force-gra
|
|
|
44
44
|
* [Fix nodes after dragging](https://vasturiano.github.io/force-graph/example/fix-dragged-nodes/) ([source](https://github.com/vasturiano/force-graph/blob/master/example/fix-dragged-nodes/index.html))
|
|
45
45
|
* [Fit graph to canvas](https://vasturiano.github.io/force-graph/example/fit-to-canvas/) ([source](https://github.com/vasturiano/force-graph/blob/master/example/fit-to-canvas/index.html))
|
|
46
46
|
* [Dynamic data changes](https://vasturiano.github.io/force-graph/example/dynamic/) ([source](https://github.com/vasturiano/force-graph/blob/master/example/dynamic/index.html))
|
|
47
|
+
* [Beeswarm chart](https://vasturiano.github.io/force-graph/example/beeswarm/) ([source](https://github.com/vasturiano/force-graph/blob/master/example/beeswarm/index.html))
|
|
47
48
|
* [Node collision detection](https://vasturiano.github.io/force-graph/example/collision-detection/) ([source](https://github.com/vasturiano/force-graph/blob/master/example/collision-detection/index.html))
|
|
48
49
|
* [Emit link particles on demand](https://vasturiano.github.io/force-graph/example/emit-particles/) ([source](https://github.com/vasturiano/force-graph/blob/master/example/emit-particles/index.html))
|
|
49
50
|
* [Force-directed tree (DAG mode)](https://vasturiano.github.io/force-graph/example/tree/) ([source](https://github.com/vasturiano/force-graph/blob/master/example/tree/index.html))
|
package/dist/force-graph.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version 1.43.
|
|
1
|
+
// Version 1.43.5 force-graph - https://github.com/vasturiano/force-graph
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -35,62 +35,91 @@
|
|
|
35
35
|
var css_248z = ".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .graph-tooltip {\n position: absolute;\n top: 0;\n font-family: sans-serif;\n font-size: 16px;\n padding: 4px;\n border-radius: 3px;\n color: #eee;\n background: rgba(0,0,0,0.65);\n visibility: hidden; /* by default */\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n";
|
|
36
36
|
styleInject(css_248z);
|
|
37
37
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
function _construct(t, e, r) {
|
|
39
|
+
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
40
|
+
var o = [null];
|
|
41
|
+
o.push.apply(o, e);
|
|
42
|
+
var p = new (t.bind.apply(t, o))();
|
|
43
|
+
return r && _setPrototypeOf(p, r.prototype), p;
|
|
44
|
+
}
|
|
45
|
+
function _isNativeReflectConstruct() {
|
|
46
|
+
try {
|
|
47
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
48
|
+
} catch (t) {}
|
|
49
|
+
return (_isNativeReflectConstruct = function () {
|
|
50
|
+
return !!t;
|
|
51
|
+
})();
|
|
52
|
+
}
|
|
53
|
+
function _iterableToArrayLimit$2(r, l) {
|
|
54
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
55
|
+
if (null != t) {
|
|
56
|
+
var e,
|
|
57
|
+
n,
|
|
58
|
+
i,
|
|
59
|
+
u,
|
|
60
|
+
a = [],
|
|
61
|
+
f = !0,
|
|
62
|
+
o = !1;
|
|
48
63
|
try {
|
|
49
|
-
if (
|
|
50
|
-
if (Object(
|
|
51
|
-
|
|
52
|
-
} else for (; !(
|
|
53
|
-
} catch (
|
|
54
|
-
|
|
64
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
65
|
+
if (Object(t) !== t) return;
|
|
66
|
+
f = !1;
|
|
67
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
68
|
+
} catch (r) {
|
|
69
|
+
o = !0, n = r;
|
|
55
70
|
} finally {
|
|
56
71
|
try {
|
|
57
|
-
if (!
|
|
72
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
58
73
|
} finally {
|
|
59
|
-
if (
|
|
74
|
+
if (o) throw n;
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
|
-
return
|
|
77
|
+
return a;
|
|
63
78
|
}
|
|
64
79
|
}
|
|
65
|
-
function ownKeys(
|
|
66
|
-
var
|
|
80
|
+
function ownKeys(e, r) {
|
|
81
|
+
var t = Object.keys(e);
|
|
67
82
|
if (Object.getOwnPropertySymbols) {
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
return Object.getOwnPropertyDescriptor(
|
|
71
|
-
})),
|
|
72
|
-
}
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
function _objectSpread2(
|
|
76
|
-
for (var
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
_defineProperty(
|
|
80
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
81
|
-
Object.defineProperty(
|
|
83
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
84
|
+
r && (o = o.filter(function (r) {
|
|
85
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
86
|
+
})), t.push.apply(t, o);
|
|
87
|
+
}
|
|
88
|
+
return t;
|
|
89
|
+
}
|
|
90
|
+
function _objectSpread2(e) {
|
|
91
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
92
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
93
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
94
|
+
_defineProperty(e, r, t[r]);
|
|
95
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
96
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
82
97
|
});
|
|
83
98
|
}
|
|
84
|
-
return
|
|
99
|
+
return e;
|
|
100
|
+
}
|
|
101
|
+
function _toPrimitive$3(t, r) {
|
|
102
|
+
if ("object" != typeof t || !t) return t;
|
|
103
|
+
var e = t[Symbol.toPrimitive];
|
|
104
|
+
if (void 0 !== e) {
|
|
105
|
+
var i = e.call(t, r || "default");
|
|
106
|
+
if ("object" != typeof i) return i;
|
|
107
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
108
|
+
}
|
|
109
|
+
return ("string" === r ? String : Number)(t);
|
|
85
110
|
}
|
|
86
|
-
function
|
|
111
|
+
function _toPropertyKey$3(t) {
|
|
112
|
+
var i = _toPrimitive$3(t, "string");
|
|
113
|
+
return "symbol" == typeof i ? i : String(i);
|
|
114
|
+
}
|
|
115
|
+
function _typeof$1(o) {
|
|
87
116
|
"@babel/helpers - typeof";
|
|
88
117
|
|
|
89
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
90
|
-
return typeof
|
|
91
|
-
} : function (
|
|
92
|
-
return
|
|
93
|
-
}, _typeof$1(
|
|
118
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
119
|
+
return typeof o;
|
|
120
|
+
} : function (o) {
|
|
121
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
122
|
+
}, _typeof$1(o);
|
|
94
123
|
}
|
|
95
124
|
function _defineProperty(obj, key, value) {
|
|
96
125
|
key = _toPropertyKey$3(key);
|
|
@@ -113,32 +142,6 @@
|
|
|
113
142
|
};
|
|
114
143
|
return _setPrototypeOf(o, p);
|
|
115
144
|
}
|
|
116
|
-
function _isNativeReflectConstruct() {
|
|
117
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
118
|
-
if (Reflect.construct.sham) return false;
|
|
119
|
-
if (typeof Proxy === "function") return true;
|
|
120
|
-
try {
|
|
121
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
122
|
-
return true;
|
|
123
|
-
} catch (e) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function _construct(Parent, args, Class) {
|
|
128
|
-
if (_isNativeReflectConstruct()) {
|
|
129
|
-
_construct = Reflect.construct.bind();
|
|
130
|
-
} else {
|
|
131
|
-
_construct = function _construct(Parent, args, Class) {
|
|
132
|
-
var a = [null];
|
|
133
|
-
a.push.apply(a, args);
|
|
134
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
135
|
-
var instance = new Constructor();
|
|
136
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
137
|
-
return instance;
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
return _construct.apply(null, arguments);
|
|
141
|
-
}
|
|
142
145
|
function _slicedToArray$2(arr, i) {
|
|
143
146
|
return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2();
|
|
144
147
|
}
|
|
@@ -173,20 +176,6 @@
|
|
|
173
176
|
function _nonIterableRest$2() {
|
|
174
177
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
175
178
|
}
|
|
176
|
-
function _toPrimitive$3(input, hint) {
|
|
177
|
-
if (typeof input !== "object" || input === null) return input;
|
|
178
|
-
var prim = input[Symbol.toPrimitive];
|
|
179
|
-
if (prim !== undefined) {
|
|
180
|
-
var res = prim.call(input, hint || "default");
|
|
181
|
-
if (typeof res !== "object") return res;
|
|
182
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
183
|
-
}
|
|
184
|
-
return (hint === "string" ? String : Number)(input);
|
|
185
|
-
}
|
|
186
|
-
function _toPropertyKey$3(arg) {
|
|
187
|
-
var key = _toPrimitive$3(arg, "string");
|
|
188
|
-
return typeof key === "symbol" ? key : String(key);
|
|
189
|
-
}
|
|
190
179
|
|
|
191
180
|
var xhtml = "http://www.w3.org/1999/xhtml";
|
|
192
181
|
|
|
@@ -1052,7 +1041,7 @@
|
|
|
1052
1041
|
}
|
|
1053
1042
|
}
|
|
1054
1043
|
|
|
1055
|
-
var root$
|
|
1044
|
+
var root$1 = [null];
|
|
1056
1045
|
|
|
1057
1046
|
function Selection$1(groups, parents) {
|
|
1058
1047
|
this._groups = groups;
|
|
@@ -1060,7 +1049,7 @@
|
|
|
1060
1049
|
}
|
|
1061
1050
|
|
|
1062
1051
|
function selection() {
|
|
1063
|
-
return new Selection$1([[document.documentElement]], root$
|
|
1052
|
+
return new Selection$1([[document.documentElement]], root$1);
|
|
1064
1053
|
}
|
|
1065
1054
|
|
|
1066
1055
|
function selection_selection() {
|
|
@@ -1109,7 +1098,7 @@
|
|
|
1109
1098
|
function d3Select(selector) {
|
|
1110
1099
|
return typeof selector === "string"
|
|
1111
1100
|
? new Selection$1([[document.querySelector(selector)]], [document.documentElement])
|
|
1112
|
-
: new Selection$1([[selector]], root$
|
|
1101
|
+
: new Selection$1([[selector]], root$1);
|
|
1113
1102
|
}
|
|
1114
1103
|
|
|
1115
1104
|
function sourceEvent(event) {
|
|
@@ -2190,7 +2179,7 @@
|
|
|
2190
2179
|
clock = typeof performance === "object" && performance.now ? performance : Date,
|
|
2191
2180
|
setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };
|
|
2192
2181
|
|
|
2193
|
-
function now$
|
|
2182
|
+
function now$2() {
|
|
2194
2183
|
return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
|
|
2195
2184
|
}
|
|
2196
2185
|
|
|
@@ -2208,7 +2197,7 @@
|
|
|
2208
2197
|
constructor: Timer,
|
|
2209
2198
|
restart: function(callback, delay, time) {
|
|
2210
2199
|
if (typeof callback !== "function") throw new TypeError("callback is not a function");
|
|
2211
|
-
time = (time == null ? now$
|
|
2200
|
+
time = (time == null ? now$2() : +time) + (delay == null ? 0 : +delay);
|
|
2212
2201
|
if (!this._next && taskTail !== this) {
|
|
2213
2202
|
if (taskTail) taskTail._next = this;
|
|
2214
2203
|
else taskHead = this;
|
|
@@ -2234,7 +2223,7 @@
|
|
|
2234
2223
|
}
|
|
2235
2224
|
|
|
2236
2225
|
function timerFlush() {
|
|
2237
|
-
now$
|
|
2226
|
+
now$2(); // Get the current time, if not already set.
|
|
2238
2227
|
++frame; // Pretend we’ve set an alarm, if we haven’t already.
|
|
2239
2228
|
var t = taskHead, e;
|
|
2240
2229
|
while (t) {
|
|
@@ -3149,7 +3138,7 @@
|
|
|
3149
3138
|
if (name instanceof Transition) {
|
|
3150
3139
|
id = name._id, name = name._name;
|
|
3151
3140
|
} else {
|
|
3152
|
-
id = newId(), (timing = defaultTiming).time = now$
|
|
3141
|
+
id = newId(), (timing = defaultTiming).time = now$2(), name = name == null ? null : name + "";
|
|
3153
3142
|
}
|
|
3154
3143
|
|
|
3155
3144
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
@@ -3772,20 +3761,14 @@
|
|
|
3772
3761
|
/** Detect free variable `global` from Node.js. */
|
|
3773
3762
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
3774
3763
|
|
|
3775
|
-
var freeGlobal$1 = freeGlobal;
|
|
3776
|
-
|
|
3777
3764
|
/** Detect free variable `self`. */
|
|
3778
3765
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
3779
3766
|
|
|
3780
3767
|
/** Used as a reference to the global object. */
|
|
3781
|
-
var root = freeGlobal
|
|
3782
|
-
|
|
3783
|
-
var root$1 = root;
|
|
3768
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
3784
3769
|
|
|
3785
3770
|
/** Built-in value references. */
|
|
3786
|
-
var Symbol$1 = root
|
|
3787
|
-
|
|
3788
|
-
var Symbol$2 = Symbol$1;
|
|
3771
|
+
var Symbol$1 = root.Symbol;
|
|
3789
3772
|
|
|
3790
3773
|
/** Used for built-in method references. */
|
|
3791
3774
|
var objectProto$1 = Object.prototype;
|
|
@@ -3801,7 +3784,7 @@
|
|
|
3801
3784
|
var nativeObjectToString$1 = objectProto$1.toString;
|
|
3802
3785
|
|
|
3803
3786
|
/** Built-in value references. */
|
|
3804
|
-
var symToStringTag$1 = Symbol$
|
|
3787
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
3805
3788
|
|
|
3806
3789
|
/**
|
|
3807
3790
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
@@ -3856,7 +3839,7 @@
|
|
|
3856
3839
|
undefinedTag = '[object Undefined]';
|
|
3857
3840
|
|
|
3858
3841
|
/** Built-in value references. */
|
|
3859
|
-
var symToStringTag = Symbol$
|
|
3842
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
3860
3843
|
|
|
3861
3844
|
/**
|
|
3862
3845
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
@@ -4067,11 +4050,9 @@
|
|
|
4067
4050
|
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
4068
4051
|
*/
|
|
4069
4052
|
var now$1 = function() {
|
|
4070
|
-
return root
|
|
4053
|
+
return root.Date.now();
|
|
4071
4054
|
};
|
|
4072
4055
|
|
|
4073
|
-
var now$2 = now$1;
|
|
4074
|
-
|
|
4075
4056
|
/** Error message constants. */
|
|
4076
4057
|
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
4077
4058
|
|
|
@@ -4197,7 +4178,7 @@
|
|
|
4197
4178
|
}
|
|
4198
4179
|
|
|
4199
4180
|
function timerExpired() {
|
|
4200
|
-
var time = now$
|
|
4181
|
+
var time = now$1();
|
|
4201
4182
|
if (shouldInvoke(time)) {
|
|
4202
4183
|
return trailingEdge(time);
|
|
4203
4184
|
}
|
|
@@ -4226,11 +4207,11 @@
|
|
|
4226
4207
|
}
|
|
4227
4208
|
|
|
4228
4209
|
function flush() {
|
|
4229
|
-
return timerId === undefined ? result : trailingEdge(now$
|
|
4210
|
+
return timerId === undefined ? result : trailingEdge(now$1());
|
|
4230
4211
|
}
|
|
4231
4212
|
|
|
4232
4213
|
function debounced() {
|
|
4233
|
-
var time = now$
|
|
4214
|
+
var time = now$1(),
|
|
4234
4215
|
isInvoking = shouldInvoke(time);
|
|
4235
4216
|
|
|
4236
4217
|
lastArgs = arguments;
|
|
@@ -4738,18 +4719,21 @@
|
|
|
4738
4719
|
Tween.prototype.isPaused = function () {
|
|
4739
4720
|
return this._isPaused;
|
|
4740
4721
|
};
|
|
4722
|
+
Tween.prototype.getDuration = function () {
|
|
4723
|
+
return this._duration;
|
|
4724
|
+
};
|
|
4741
4725
|
Tween.prototype.to = function (target, duration) {
|
|
4742
4726
|
if (duration === void 0) { duration = 1000; }
|
|
4743
4727
|
if (this._isPlaying)
|
|
4744
4728
|
throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');
|
|
4745
4729
|
this._valuesEnd = target;
|
|
4746
4730
|
this._propertiesAreSetUp = false;
|
|
4747
|
-
this._duration = duration;
|
|
4731
|
+
this._duration = duration < 0 ? 0 : duration;
|
|
4748
4732
|
return this;
|
|
4749
4733
|
};
|
|
4750
4734
|
Tween.prototype.duration = function (duration) {
|
|
4751
4735
|
if (duration === void 0) { duration = 1000; }
|
|
4752
|
-
this._duration = duration;
|
|
4736
|
+
this._duration = duration < 0 ? 0 : duration;
|
|
4753
4737
|
return this;
|
|
4754
4738
|
};
|
|
4755
4739
|
Tween.prototype.dynamic = function (dynamic) {
|
|
@@ -4998,12 +4982,13 @@
|
|
|
4998
4982
|
* it is still playing, just paused).
|
|
4999
4983
|
*/
|
|
5000
4984
|
Tween.prototype.update = function (time, autoStart) {
|
|
4985
|
+
var _this = this;
|
|
4986
|
+
var _a;
|
|
5001
4987
|
if (time === void 0) { time = now(); }
|
|
5002
4988
|
if (autoStart === void 0) { autoStart = true; }
|
|
5003
4989
|
if (this._isPaused)
|
|
5004
4990
|
return true;
|
|
5005
4991
|
var property;
|
|
5006
|
-
var elapsed;
|
|
5007
4992
|
var endTime = this._startTime + this._duration;
|
|
5008
4993
|
if (!this._goToEnd && !this._isPlaying) {
|
|
5009
4994
|
if (time > endTime)
|
|
@@ -5027,18 +5012,37 @@
|
|
|
5027
5012
|
}
|
|
5028
5013
|
this._onEveryStartCallbackFired = true;
|
|
5029
5014
|
}
|
|
5030
|
-
|
|
5031
|
-
|
|
5015
|
+
var elapsedTime = time - this._startTime;
|
|
5016
|
+
var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime);
|
|
5017
|
+
var totalTime = this._duration + this._repeat * durationAndDelay;
|
|
5018
|
+
var calculateElapsedPortion = function () {
|
|
5019
|
+
if (_this._duration === 0)
|
|
5020
|
+
return 1;
|
|
5021
|
+
if (elapsedTime > totalTime) {
|
|
5022
|
+
return 1;
|
|
5023
|
+
}
|
|
5024
|
+
var timesRepeated = Math.trunc(elapsedTime / durationAndDelay);
|
|
5025
|
+
var timeIntoCurrentRepeat = elapsedTime - timesRepeated * durationAndDelay;
|
|
5026
|
+
// TODO use %?
|
|
5027
|
+
// const timeIntoCurrentRepeat = elapsedTime % durationAndDelay
|
|
5028
|
+
var portion = Math.min(timeIntoCurrentRepeat / _this._duration, 1);
|
|
5029
|
+
if (portion === 0 && elapsedTime === _this._duration) {
|
|
5030
|
+
return 1;
|
|
5031
|
+
}
|
|
5032
|
+
return portion;
|
|
5033
|
+
};
|
|
5034
|
+
var elapsed = calculateElapsedPortion();
|
|
5032
5035
|
var value = this._easingFunction(elapsed);
|
|
5033
5036
|
// properties transformations
|
|
5034
5037
|
this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value);
|
|
5035
5038
|
if (this._onUpdateCallback) {
|
|
5036
5039
|
this._onUpdateCallback(this._object, elapsed);
|
|
5037
5040
|
}
|
|
5038
|
-
if (
|
|
5041
|
+
if (this._duration === 0 || elapsedTime >= this._duration) {
|
|
5039
5042
|
if (this._repeat > 0) {
|
|
5043
|
+
var completeCount = Math.min(Math.trunc((elapsedTime - this._duration) / durationAndDelay) + 1, this._repeat);
|
|
5040
5044
|
if (isFinite(this._repeat)) {
|
|
5041
|
-
this._repeat
|
|
5045
|
+
this._repeat -= completeCount;
|
|
5042
5046
|
}
|
|
5043
5047
|
// Reassign starting values, restart by making startTime = now
|
|
5044
5048
|
for (property in this._valuesStartRepeat) {
|
|
@@ -5056,12 +5060,7 @@
|
|
|
5056
5060
|
if (this._yoyo) {
|
|
5057
5061
|
this._reversed = !this._reversed;
|
|
5058
5062
|
}
|
|
5059
|
-
|
|
5060
|
-
this._startTime = time + this._repeatDelayTime;
|
|
5061
|
-
}
|
|
5062
|
-
else {
|
|
5063
|
-
this._startTime = time + this._delayTime;
|
|
5064
|
-
}
|
|
5063
|
+
this._startTime += durationAndDelay * completeCount;
|
|
5065
5064
|
if (this._onRepeatCallback) {
|
|
5066
5065
|
this._onRepeatCallback(this._object);
|
|
5067
5066
|
}
|
|
@@ -5153,31 +5152,31 @@
|
|
|
5153
5152
|
TWEEN.remove.bind(TWEEN);
|
|
5154
5153
|
var update = TWEEN.update.bind(TWEEN);
|
|
5155
5154
|
|
|
5156
|
-
function _iterableToArrayLimit$1(
|
|
5157
|
-
var
|
|
5158
|
-
if (null !=
|
|
5159
|
-
var
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5155
|
+
function _iterableToArrayLimit$1(r, l) {
|
|
5156
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
5157
|
+
if (null != t) {
|
|
5158
|
+
var e,
|
|
5159
|
+
n,
|
|
5160
|
+
i,
|
|
5161
|
+
u,
|
|
5162
|
+
a = [],
|
|
5163
|
+
f = !0,
|
|
5164
|
+
o = !1;
|
|
5166
5165
|
try {
|
|
5167
|
-
if (
|
|
5168
|
-
if (Object(
|
|
5169
|
-
|
|
5170
|
-
} else for (; !(
|
|
5171
|
-
} catch (
|
|
5172
|
-
|
|
5166
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
5167
|
+
if (Object(t) !== t) return;
|
|
5168
|
+
f = !1;
|
|
5169
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
5170
|
+
} catch (r) {
|
|
5171
|
+
o = !0, n = r;
|
|
5173
5172
|
} finally {
|
|
5174
5173
|
try {
|
|
5175
|
-
if (!
|
|
5174
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
5176
5175
|
} finally {
|
|
5177
|
-
if (
|
|
5176
|
+
if (o) throw n;
|
|
5178
5177
|
}
|
|
5179
5178
|
}
|
|
5180
|
-
return
|
|
5179
|
+
return a;
|
|
5181
5180
|
}
|
|
5182
5181
|
}
|
|
5183
5182
|
function _classCallCheck$1(instance, Constructor) {
|
|
@@ -10857,7 +10856,6 @@
|
|
|
10857
10856
|
}); // unfix nodes when disabling dag mode
|
|
10858
10857
|
}
|
|
10859
10858
|
},
|
|
10860
|
-
|
|
10861
10859
|
dagLevelDistance: {},
|
|
10862
10860
|
dagNodeFilter: {
|
|
10863
10861
|
"default": function _default(node) {
|
|
@@ -11051,7 +11049,6 @@
|
|
|
11051
11049
|
if (forceFn === undefined) {
|
|
11052
11050
|
return state.forceLayout.force(forceName); // Force getter
|
|
11053
11051
|
}
|
|
11054
|
-
|
|
11055
11052
|
state.forceLayout.force(forceName, forceFn); // Force setter
|
|
11056
11053
|
return this;
|
|
11057
11054
|
},
|
|
@@ -11366,7 +11363,6 @@
|
|
|
11366
11363
|
__singleHop: true
|
|
11367
11364
|
}); // add a single hop particle
|
|
11368
11365
|
}
|
|
11369
|
-
|
|
11370
11366
|
return this;
|
|
11371
11367
|
}
|
|
11372
11368
|
},
|
|
@@ -11888,7 +11884,6 @@
|
|
|
11888
11884
|
colorTracker: new _default() // indexed objects for rgb lookup
|
|
11889
11885
|
};
|
|
11890
11886
|
},
|
|
11891
|
-
|
|
11892
11887
|
init: function init(domNode, state) {
|
|
11893
11888
|
var _this = this;
|
|
11894
11889
|
// Wipe DOM
|
|
@@ -12092,7 +12087,6 @@
|
|
|
12092
12087
|
state.isPointerDragging = false;
|
|
12093
12088
|
return; // don't trigger click events after pointer drag (pan / node drag functionality)
|
|
12094
12089
|
}
|
|
12095
|
-
|
|
12096
12090
|
var cbEvents = [ev, state.pointerDownEvent];
|
|
12097
12091
|
requestAnimationFrame(function () {
|
|
12098
12092
|
// trigger click events asynchronously, to allow hoverObj to be set (on frame)
|