@antv/g 1.0.0-alpha.26 → 1.0.0-alpha.27
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.esm.js +66 -456
- package/package.json +5 -4
package/dist/index.esm.js
CHANGED
|
@@ -1,418 +1,28 @@
|
|
|
1
1
|
import { singleton, inject, Syringe, contrib, GlobalContainer, postConstruct, Module, Contribution } from 'mana-syringe';
|
|
2
2
|
import { Component, World, containerModule as containerModule$2 } from '@antv/g-ecs';
|
|
3
|
+
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
|
|
4
|
+
import _createClass from '@babel/runtime/helpers/esm/createClass';
|
|
5
|
+
import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
|
|
6
|
+
import _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';
|
|
3
7
|
import { isNil, isString, isNumber, isBoolean, isObject, isFunction, clamp, isFinite as isFinite$1, uniq, isEqual, isUndefined } from '@antv/util';
|
|
8
|
+
import _inherits from '@babel/runtime/helpers/esm/inherits';
|
|
9
|
+
import _createSuper from '@babel/runtime/helpers/esm/createSuper';
|
|
4
10
|
import { vec3, quat, mat4, mat3, vec4 } from 'gl-matrix';
|
|
11
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
12
|
+
import _asyncToGenerator from '@babel/runtime/helpers/esm/asyncToGenerator';
|
|
5
13
|
import { AsyncSeriesHook, SyncWaterfallHook, SyncHook, AsyncSeriesWaterfallHook } from 'tapable';
|
|
6
14
|
import { EventEmitter } from 'eventemitter3';
|
|
15
|
+
import _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';
|
|
16
|
+
import '@babel/runtime/helpers/esm/defineProperty';
|
|
7
17
|
import { Cubic as Cubic$1, Polyline as Polyline$1, Line as Line$1 } from '@antv/g-math';
|
|
18
|
+
import _typeof from '@babel/runtime/helpers/esm/typeof';
|
|
8
19
|
import { color } from 'd3-color';
|
|
9
20
|
import { path2Absolute, path2Curve, path2Segments } from '@antv/path-util';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
16
|
-
|
|
17
|
-
if (enumerableOnly) {
|
|
18
|
-
symbols = symbols.filter(function (sym) {
|
|
19
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
keys.push.apply(keys, symbols);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return keys;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function _objectSpread2(target) {
|
|
30
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
31
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
32
|
-
|
|
33
|
-
if (i % 2) {
|
|
34
|
-
ownKeys(Object(source), true).forEach(function (key) {
|
|
35
|
-
_defineProperty(target, key, source[key]);
|
|
36
|
-
});
|
|
37
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
38
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
39
|
-
} else {
|
|
40
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
41
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return target;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function _typeof(obj) {
|
|
50
|
-
"@babel/helpers - typeof";
|
|
51
|
-
|
|
52
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
53
|
-
_typeof = function (obj) {
|
|
54
|
-
return typeof obj;
|
|
55
|
-
};
|
|
56
|
-
} else {
|
|
57
|
-
_typeof = function (obj) {
|
|
58
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return _typeof(obj);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
66
|
-
try {
|
|
67
|
-
var info = gen[key](arg);
|
|
68
|
-
var value = info.value;
|
|
69
|
-
} catch (error) {
|
|
70
|
-
reject(error);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (info.done) {
|
|
75
|
-
resolve(value);
|
|
76
|
-
} else {
|
|
77
|
-
Promise.resolve(value).then(_next, _throw);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function _asyncToGenerator(fn) {
|
|
82
|
-
return function () {
|
|
83
|
-
var self = this,
|
|
84
|
-
args = arguments;
|
|
85
|
-
return new Promise(function (resolve, reject) {
|
|
86
|
-
var gen = fn.apply(self, args);
|
|
87
|
-
|
|
88
|
-
function _next(value) {
|
|
89
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _throw(err) {
|
|
93
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
_next(undefined);
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function _classCallCheck(instance, Constructor) {
|
|
102
|
-
if (!(instance instanceof Constructor)) {
|
|
103
|
-
throw new TypeError("Cannot call a class as a function");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function _defineProperties(target, props) {
|
|
108
|
-
for (var i = 0; i < props.length; i++) {
|
|
109
|
-
var descriptor = props[i];
|
|
110
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
111
|
-
descriptor.configurable = true;
|
|
112
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
113
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
118
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
119
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
120
|
-
return Constructor;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function _defineProperty(obj, key, value) {
|
|
124
|
-
if (key in obj) {
|
|
125
|
-
Object.defineProperty(obj, key, {
|
|
126
|
-
value: value,
|
|
127
|
-
enumerable: true,
|
|
128
|
-
configurable: true,
|
|
129
|
-
writable: true
|
|
130
|
-
});
|
|
131
|
-
} else {
|
|
132
|
-
obj[key] = value;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return obj;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function _inherits(subClass, superClass) {
|
|
139
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
140
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
144
|
-
constructor: {
|
|
145
|
-
value: subClass,
|
|
146
|
-
writable: true,
|
|
147
|
-
configurable: true
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function _getPrototypeOf(o) {
|
|
154
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
155
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
156
|
-
};
|
|
157
|
-
return _getPrototypeOf(o);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function _setPrototypeOf(o, p) {
|
|
161
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
162
|
-
o.__proto__ = p;
|
|
163
|
-
return o;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
return _setPrototypeOf(o, p);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function _isNativeReflectConstruct() {
|
|
170
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
171
|
-
if (Reflect.construct.sham) return false;
|
|
172
|
-
if (typeof Proxy === "function") return true;
|
|
173
|
-
|
|
174
|
-
try {
|
|
175
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
176
|
-
return true;
|
|
177
|
-
} catch (e) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
183
|
-
if (source == null) return {};
|
|
184
|
-
var target = {};
|
|
185
|
-
var sourceKeys = Object.keys(source);
|
|
186
|
-
var key, i;
|
|
187
|
-
|
|
188
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
189
|
-
key = sourceKeys[i];
|
|
190
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
191
|
-
target[key] = source[key];
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
return target;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
function _objectWithoutProperties(source, excluded) {
|
|
198
|
-
if (source == null) return {};
|
|
199
|
-
|
|
200
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
201
|
-
|
|
202
|
-
var key, i;
|
|
203
|
-
|
|
204
|
-
if (Object.getOwnPropertySymbols) {
|
|
205
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
206
|
-
|
|
207
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
208
|
-
key = sourceSymbolKeys[i];
|
|
209
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
210
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
211
|
-
target[key] = source[key];
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return target;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function _assertThisInitialized(self) {
|
|
219
|
-
if (self === void 0) {
|
|
220
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
return self;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function _possibleConstructorReturn(self, call) {
|
|
227
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
228
|
-
return call;
|
|
229
|
-
} else if (call !== void 0) {
|
|
230
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
return _assertThisInitialized(self);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function _createSuper(Derived) {
|
|
237
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
238
|
-
|
|
239
|
-
return function _createSuperInternal() {
|
|
240
|
-
var Super = _getPrototypeOf(Derived),
|
|
241
|
-
result;
|
|
242
|
-
|
|
243
|
-
if (hasNativeReflectConstruct) {
|
|
244
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
245
|
-
|
|
246
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
247
|
-
} else {
|
|
248
|
-
result = Super.apply(this, arguments);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return _possibleConstructorReturn(this, result);
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function _superPropBase(object, property) {
|
|
256
|
-
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
257
|
-
object = _getPrototypeOf(object);
|
|
258
|
-
if (object === null) break;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
return object;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
function _get(target, property, receiver) {
|
|
265
|
-
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
266
|
-
_get = Reflect.get;
|
|
267
|
-
} else {
|
|
268
|
-
_get = function _get(target, property, receiver) {
|
|
269
|
-
var base = _superPropBase(target, property);
|
|
270
|
-
|
|
271
|
-
if (!base) return;
|
|
272
|
-
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
273
|
-
|
|
274
|
-
if (desc.get) {
|
|
275
|
-
return desc.get.call(receiver);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
return desc.value;
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
return _get(target, property, receiver || target);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function _slicedToArray(arr, i) {
|
|
286
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function _toConsumableArray(arr) {
|
|
290
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
function _arrayWithoutHoles(arr) {
|
|
294
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
function _arrayWithHoles(arr) {
|
|
298
|
-
if (Array.isArray(arr)) return arr;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
function _iterableToArray(iter) {
|
|
302
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
function _iterableToArrayLimit(arr, i) {
|
|
306
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
307
|
-
|
|
308
|
-
if (_i == null) return;
|
|
309
|
-
var _arr = [];
|
|
310
|
-
var _n = true;
|
|
311
|
-
var _d = false;
|
|
312
|
-
|
|
313
|
-
var _s, _e;
|
|
314
|
-
|
|
315
|
-
try {
|
|
316
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
317
|
-
_arr.push(_s.value);
|
|
318
|
-
|
|
319
|
-
if (i && _arr.length === i) break;
|
|
320
|
-
}
|
|
321
|
-
} catch (err) {
|
|
322
|
-
_d = true;
|
|
323
|
-
_e = err;
|
|
324
|
-
} finally {
|
|
325
|
-
try {
|
|
326
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
327
|
-
} finally {
|
|
328
|
-
if (_d) throw _e;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
return _arr;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
336
|
-
if (!o) return;
|
|
337
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
338
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
339
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
340
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
341
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
function _arrayLikeToArray(arr, len) {
|
|
345
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
346
|
-
|
|
347
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
348
|
-
|
|
349
|
-
return arr2;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
function _nonIterableSpread() {
|
|
353
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
function _nonIterableRest() {
|
|
357
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
361
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
362
|
-
|
|
363
|
-
if (!it) {
|
|
364
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
365
|
-
if (it) o = it;
|
|
366
|
-
var i = 0;
|
|
367
|
-
|
|
368
|
-
var F = function () {};
|
|
369
|
-
|
|
370
|
-
return {
|
|
371
|
-
s: F,
|
|
372
|
-
n: function () {
|
|
373
|
-
if (i >= o.length) return {
|
|
374
|
-
done: true
|
|
375
|
-
};
|
|
376
|
-
return {
|
|
377
|
-
done: false,
|
|
378
|
-
value: o[i++]
|
|
379
|
-
};
|
|
380
|
-
},
|
|
381
|
-
e: function (e) {
|
|
382
|
-
throw e;
|
|
383
|
-
},
|
|
384
|
-
f: F
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
var normalCompletion = true,
|
|
392
|
-
didErr = false,
|
|
393
|
-
err;
|
|
394
|
-
return {
|
|
395
|
-
s: function () {
|
|
396
|
-
it = it.call(o);
|
|
397
|
-
},
|
|
398
|
-
n: function () {
|
|
399
|
-
var step = it.next();
|
|
400
|
-
normalCompletion = step.done;
|
|
401
|
-
return step;
|
|
402
|
-
},
|
|
403
|
-
e: function (e) {
|
|
404
|
-
didErr = true;
|
|
405
|
-
err = e;
|
|
406
|
-
},
|
|
407
|
-
f: function () {
|
|
408
|
-
try {
|
|
409
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
410
|
-
} finally {
|
|
411
|
-
if (didErr) throw err;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
}
|
|
21
|
+
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
|
|
22
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
23
|
+
import _get from '@babel/runtime/helpers/esm/get';
|
|
24
|
+
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
|
|
25
|
+
import _createForOfIteratorHelper from '@babel/runtime/helpers/esm/createForOfIteratorHelper';
|
|
416
26
|
|
|
417
27
|
/*! *****************************************************************************
|
|
418
28
|
Copyright (c) Microsoft Corporation.
|
|
@@ -3166,10 +2776,10 @@ var RenderingService = /*#__PURE__*/function () {
|
|
|
3166
2776
|
_createClass(RenderingService, [{
|
|
3167
2777
|
key: "init",
|
|
3168
2778
|
value: function () {
|
|
3169
|
-
var _init = _asyncToGenerator( /*#__PURE__*/
|
|
2779
|
+
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
3170
2780
|
var _this = this;
|
|
3171
2781
|
|
|
3172
|
-
return
|
|
2782
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
3173
2783
|
while (1) {
|
|
3174
2784
|
switch (_context.prev = _context.next) {
|
|
3175
2785
|
case 0:
|
|
@@ -4572,9 +4182,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
4572
4182
|
_this.pickHandler = void 0;
|
|
4573
4183
|
|
|
4574
4184
|
_this.onPointerDown = /*#__PURE__*/function () {
|
|
4575
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
4185
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(from) {
|
|
4576
4186
|
var e, isRightButton, trackingData;
|
|
4577
|
-
return
|
|
4187
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4578
4188
|
while (1) {
|
|
4579
4189
|
switch (_context.prev = _context.next) {
|
|
4580
4190
|
case 0:
|
|
@@ -4621,10 +4231,10 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
4621
4231
|
}();
|
|
4622
4232
|
|
|
4623
4233
|
_this.onPointerUp = /*#__PURE__*/function () {
|
|
4624
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
|
4234
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(from) {
|
|
4625
4235
|
var now, e, isRightButton, trackingData, pressTarget, clickTarget, currentTarget, _isRightButton, clickEvent, clickHistory;
|
|
4626
4236
|
|
|
4627
|
-
return
|
|
4237
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
4628
4238
|
while (1) {
|
|
4629
4239
|
switch (_context2.prev = _context2.next) {
|
|
4630
4240
|
case 0:
|
|
@@ -4737,9 +4347,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
4737
4347
|
}();
|
|
4738
4348
|
|
|
4739
4349
|
_this.onPointerMove = /*#__PURE__*/function () {
|
|
4740
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
|
4350
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(from) {
|
|
4741
4351
|
var e, isMouse, trackingData, outTarget, outType, outEvent, leaveEvent, overType, overEvent, overTargetAncestor, didPointerEnter, enterEvent;
|
|
4742
|
-
return
|
|
4352
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
4743
4353
|
while (1) {
|
|
4744
4354
|
switch (_context3.prev = _context3.next) {
|
|
4745
4355
|
case 0:
|
|
@@ -4897,9 +4507,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
4897
4507
|
}();
|
|
4898
4508
|
|
|
4899
4509
|
_this.onPointerOut = /*#__PURE__*/function () {
|
|
4900
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
|
4510
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(from) {
|
|
4901
4511
|
var trackingData, isMouse, outTarget, outEvent, leaveEvent;
|
|
4902
|
-
return
|
|
4512
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
4903
4513
|
while (1) {
|
|
4904
4514
|
switch (_context4.prev = _context4.next) {
|
|
4905
4515
|
case 0:
|
|
@@ -4974,9 +4584,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
4974
4584
|
}();
|
|
4975
4585
|
|
|
4976
4586
|
_this.onPointerOver = /*#__PURE__*/function () {
|
|
4977
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/
|
|
4587
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(from) {
|
|
4978
4588
|
var trackingData, e, isMouse, enterEvent;
|
|
4979
|
-
return
|
|
4589
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
4980
4590
|
while (1) {
|
|
4981
4591
|
switch (_context5.prev = _context5.next) {
|
|
4982
4592
|
case 0:
|
|
@@ -5040,9 +4650,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5040
4650
|
}();
|
|
5041
4651
|
|
|
5042
4652
|
_this.onPointerUpOutside = /*#__PURE__*/function () {
|
|
5043
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
|
4653
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(from) {
|
|
5044
4654
|
var trackingData, pressTarget, e, currentTarget;
|
|
5045
|
-
return
|
|
4655
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
5046
4656
|
while (1) {
|
|
5047
4657
|
switch (_context6.prev = _context6.next) {
|
|
5048
4658
|
case 0:
|
|
@@ -5100,9 +4710,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5100
4710
|
}();
|
|
5101
4711
|
|
|
5102
4712
|
_this.onWheel = /*#__PURE__*/function () {
|
|
5103
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
|
4713
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(from) {
|
|
5104
4714
|
var wheelEvent;
|
|
5105
|
-
return
|
|
4715
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
5106
4716
|
while (1) {
|
|
5107
4717
|
switch (_context7.prev = _context7.next) {
|
|
5108
4718
|
case 0:
|
|
@@ -5311,10 +4921,10 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5311
4921
|
}, {
|
|
5312
4922
|
key: "hitTest",
|
|
5313
4923
|
value: function () {
|
|
5314
|
-
var _hitTest = _asyncToGenerator( /*#__PURE__*/
|
|
4924
|
+
var _hitTest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(position) {
|
|
5315
4925
|
var viewportX, viewportY, _this$canvasConfig3, width, height;
|
|
5316
4926
|
|
|
5317
|
-
return
|
|
4927
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
5318
4928
|
while (1) {
|
|
5319
4929
|
switch (_context8.prev = _context8.next) {
|
|
5320
4930
|
case 0:
|
|
@@ -5373,9 +4983,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5373
4983
|
}, {
|
|
5374
4984
|
key: "createPointerEvent",
|
|
5375
4985
|
value: function () {
|
|
5376
|
-
var _createPointerEvent = _asyncToGenerator( /*#__PURE__*/
|
|
4986
|
+
var _createPointerEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(from, type, target) {
|
|
5377
4987
|
var event;
|
|
5378
|
-
return
|
|
4988
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
5379
4989
|
while (1) {
|
|
5380
4990
|
switch (_context9.prev = _context9.next) {
|
|
5381
4991
|
case 0:
|
|
@@ -5435,9 +5045,9 @@ var EventService = /*#__PURE__*/function (_EventEmitter) {
|
|
|
5435
5045
|
}, {
|
|
5436
5046
|
key: "createWheelEvent",
|
|
5437
5047
|
value: function () {
|
|
5438
|
-
var _createWheelEvent = _asyncToGenerator( /*#__PURE__*/
|
|
5048
|
+
var _createWheelEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(from) {
|
|
5439
5049
|
var event;
|
|
5440
|
-
return
|
|
5050
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
5441
5051
|
while (1) {
|
|
5442
5052
|
switch (_context10.prev = _context10.next) {
|
|
5443
5053
|
case 0:
|
|
@@ -9703,7 +9313,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
9703
9313
|
_this.interactive = (_this$config$interact = _this.config.interactive) !== null && _this$config$interact !== void 0 ? _this$config$interact : true;
|
|
9704
9314
|
_this.nodeName = _this.config.type || SHAPE.Group; // compatible with G 3.0
|
|
9705
9315
|
|
|
9706
|
-
_this.config.style =
|
|
9316
|
+
_this.config.style = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_STYLE_PROPS), {}, {
|
|
9707
9317
|
zIndex: (_this$config$zIndex = _this.config.zIndex) !== null && _this$config$zIndex !== void 0 ? _this$config$zIndex : 0,
|
|
9708
9318
|
visibility: _this.config.visible === false ? 'hidden' : 'visible'
|
|
9709
9319
|
}, _this.config.style), _this.config.attrs);
|
|
@@ -9747,7 +9357,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
9747
9357
|
name: this.name,
|
|
9748
9358
|
className: this.name,
|
|
9749
9359
|
interactive: this.interactive,
|
|
9750
|
-
style:
|
|
9360
|
+
style: _objectSpread({}, this.style)
|
|
9751
9361
|
});
|
|
9752
9362
|
|
|
9753
9363
|
if (deep) {
|
|
@@ -10520,9 +10130,9 @@ var Group = /*#__PURE__*/function (_DisplayObject) {
|
|
|
10520
10130
|
style = _ref.style,
|
|
10521
10131
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10522
10132
|
|
|
10523
|
-
return _super.call(this,
|
|
10133
|
+
return _super.call(this, _objectSpread({
|
|
10524
10134
|
type: SHAPE.Group,
|
|
10525
|
-
style:
|
|
10135
|
+
style: _objectSpread({}, style)
|
|
10526
10136
|
}, rest));
|
|
10527
10137
|
}
|
|
10528
10138
|
|
|
@@ -10788,9 +10398,9 @@ var Circle = /*#__PURE__*/function (_DisplayObject) {
|
|
|
10788
10398
|
|
|
10789
10399
|
_classCallCheck(this, Circle);
|
|
10790
10400
|
|
|
10791
|
-
return _super.call(this,
|
|
10401
|
+
return _super.call(this, _objectSpread({
|
|
10792
10402
|
type: SHAPE.Circle,
|
|
10793
|
-
style:
|
|
10403
|
+
style: _objectSpread({
|
|
10794
10404
|
r: 0,
|
|
10795
10405
|
anchor: [0.5, 0.5]
|
|
10796
10406
|
}, style)
|
|
@@ -10812,9 +10422,9 @@ var Ellipse = /*#__PURE__*/function (_DisplayObject) {
|
|
|
10812
10422
|
|
|
10813
10423
|
_classCallCheck(this, Ellipse);
|
|
10814
10424
|
|
|
10815
|
-
return _super.call(this,
|
|
10425
|
+
return _super.call(this, _objectSpread({
|
|
10816
10426
|
type: SHAPE.Ellipse,
|
|
10817
|
-
style:
|
|
10427
|
+
style: _objectSpread({
|
|
10818
10428
|
rx: 0,
|
|
10819
10429
|
ry: 0,
|
|
10820
10430
|
anchor: [0.5, 0.5]
|
|
@@ -10837,9 +10447,9 @@ var Image = /*#__PURE__*/function (_DisplayObject) {
|
|
|
10837
10447
|
|
|
10838
10448
|
_classCallCheck(this, Image);
|
|
10839
10449
|
|
|
10840
|
-
return _super.call(this,
|
|
10450
|
+
return _super.call(this, _objectSpread({
|
|
10841
10451
|
type: SHAPE.Image,
|
|
10842
|
-
style:
|
|
10452
|
+
style: _objectSpread({
|
|
10843
10453
|
img: ''
|
|
10844
10454
|
}, style)
|
|
10845
10455
|
}, rest));
|
|
@@ -10860,9 +10470,9 @@ var Line = /*#__PURE__*/function (_DisplayObject) {
|
|
|
10860
10470
|
|
|
10861
10471
|
_classCallCheck(this, Line);
|
|
10862
10472
|
|
|
10863
|
-
return _super.call(this,
|
|
10473
|
+
return _super.call(this, _objectSpread({
|
|
10864
10474
|
type: SHAPE.Line,
|
|
10865
|
-
style:
|
|
10475
|
+
style: _objectSpread({
|
|
10866
10476
|
x1: 0,
|
|
10867
10477
|
y1: 0,
|
|
10868
10478
|
x2: 0,
|
|
@@ -10916,9 +10526,9 @@ var Path = /*#__PURE__*/function (_DisplayObject) {
|
|
|
10916
10526
|
|
|
10917
10527
|
_classCallCheck(this, Path);
|
|
10918
10528
|
|
|
10919
|
-
return _super.call(this,
|
|
10529
|
+
return _super.call(this, _objectSpread({
|
|
10920
10530
|
type: SHAPE.Path,
|
|
10921
|
-
style:
|
|
10531
|
+
style: _objectSpread({
|
|
10922
10532
|
path: '',
|
|
10923
10533
|
lineJoin: "miter"
|
|
10924
10534
|
/* Miter */
|
|
@@ -11049,9 +10659,9 @@ var Polygon = /*#__PURE__*/function (_DisplayObject) {
|
|
|
11049
10659
|
|
|
11050
10660
|
_classCallCheck(this, Polygon);
|
|
11051
10661
|
|
|
11052
|
-
return _super.call(this,
|
|
10662
|
+
return _super.call(this, _objectSpread({
|
|
11053
10663
|
type: SHAPE.Polygon,
|
|
11054
|
-
style:
|
|
10664
|
+
style: _objectSpread({
|
|
11055
10665
|
points: []
|
|
11056
10666
|
}, style)
|
|
11057
10667
|
}, rest));
|
|
@@ -11072,9 +10682,9 @@ var Polyline = /*#__PURE__*/function (_DisplayObject) {
|
|
|
11072
10682
|
|
|
11073
10683
|
_classCallCheck(this, Polyline);
|
|
11074
10684
|
|
|
11075
|
-
return _super.call(this,
|
|
10685
|
+
return _super.call(this, _objectSpread({
|
|
11076
10686
|
type: SHAPE.Polyline,
|
|
11077
|
-
style:
|
|
10687
|
+
style: _objectSpread({
|
|
11078
10688
|
points: [],
|
|
11079
10689
|
lineJoin: "miter"
|
|
11080
10690
|
/* Miter */
|
|
@@ -11149,9 +10759,9 @@ var Rect$1 = /*#__PURE__*/function (_DisplayObject) {
|
|
|
11149
10759
|
|
|
11150
10760
|
_classCallCheck(this, Rect);
|
|
11151
10761
|
|
|
11152
|
-
return _super.call(this,
|
|
10762
|
+
return _super.call(this, _objectSpread({
|
|
11153
10763
|
type: SHAPE.Rect,
|
|
11154
|
-
style:
|
|
10764
|
+
style: _objectSpread({
|
|
11155
10765
|
width: 0,
|
|
11156
10766
|
height: 0
|
|
11157
10767
|
}, style)
|
|
@@ -11173,9 +10783,9 @@ var Text = /*#__PURE__*/function (_DisplayObject) {
|
|
|
11173
10783
|
|
|
11174
10784
|
_classCallCheck(this, Text);
|
|
11175
10785
|
|
|
11176
|
-
return _super.call(this,
|
|
10786
|
+
return _super.call(this, _objectSpread({
|
|
11177
10787
|
type: SHAPE.Text,
|
|
11178
|
-
style:
|
|
10788
|
+
style: _objectSpread({
|
|
11179
10789
|
text: '',
|
|
11180
10790
|
fontSize: 12,
|
|
11181
10791
|
fontFamily: 'sans-serif',
|
|
@@ -11242,9 +10852,9 @@ var HTML = /*#__PURE__*/function (_DisplayObject) {
|
|
|
11242
10852
|
|
|
11243
10853
|
_classCallCheck(this, HTML);
|
|
11244
10854
|
|
|
11245
|
-
_this = _super.call(this,
|
|
10855
|
+
_this = _super.call(this, _objectSpread({
|
|
11246
10856
|
type: SHAPE.HTML,
|
|
11247
|
-
style:
|
|
10857
|
+
style: _objectSpread({
|
|
11248
10858
|
innerHTML: '',
|
|
11249
10859
|
className: '',
|
|
11250
10860
|
style: ''
|
|
@@ -11373,7 +10983,7 @@ var AbstractRenderer = /*#__PURE__*/function () {
|
|
|
11373
10983
|
|
|
11374
10984
|
this.plugins = [];
|
|
11375
10985
|
this.config = void 0;
|
|
11376
|
-
this.config =
|
|
10986
|
+
this.config = _objectSpread({
|
|
11377
10987
|
/**
|
|
11378
10988
|
* enable auto rendering by default
|
|
11379
10989
|
*/
|
|
@@ -12872,10 +12482,10 @@ var EventPlugin = EventPlugin_1 = (_temp$3 = _class$3 = /*#__PURE__*/function ()
|
|
|
12872
12482
|
var _this2 = this;
|
|
12873
12483
|
|
|
12874
12484
|
this.eventService.setPickHandler( /*#__PURE__*/function () {
|
|
12875
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
12485
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(position) {
|
|
12876
12486
|
var _yield$_this2$renderi, picked;
|
|
12877
12487
|
|
|
12878
|
-
return
|
|
12488
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
12879
12489
|
while (1) {
|
|
12880
12490
|
switch (_context.prev = _context.next) {
|
|
12881
12491
|
case 0:
|
|
@@ -13162,7 +12772,7 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
|
|
|
13162
12772
|
_this.frameId = void 0;
|
|
13163
12773
|
cleanExistedCanvas(config.container, _assertThisInitialized(_this));
|
|
13164
12774
|
|
|
13165
|
-
var mergedConfig =
|
|
12775
|
+
var mergedConfig = _objectSpread(_objectSpread({}, config), {}, {
|
|
13166
12776
|
cursor: 'default'
|
|
13167
12777
|
});
|
|
13168
12778
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.27",
|
|
4
4
|
"description": "A core module including ECS and DI container.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/antvis/g#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@antv/g-ecs": "^1.0.0-alpha.
|
|
39
|
-
"@antv/g-math": "^1.0.0-alpha.
|
|
38
|
+
"@antv/g-ecs": "^1.0.0-alpha.11",
|
|
39
|
+
"@antv/g-math": "^1.0.0-alpha.7",
|
|
40
40
|
"@antv/path-util": "^2.0.14",
|
|
41
41
|
"@antv/util": "^2.0.13",
|
|
42
|
+
"@babel/runtime": "^7.16.0",
|
|
42
43
|
"d3-color": "^1.4.0",
|
|
43
44
|
"eventemitter3": "^4.0.0",
|
|
44
45
|
"gl-matrix": "^3.1.0",
|
|
@@ -46,5 +47,5 @@
|
|
|
46
47
|
"reflect-metadata": "^0.1.13",
|
|
47
48
|
"tapable": "2.2.1"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "c01101beb86f98aaa569f97c678c909d4f3faaa3"
|
|
50
51
|
}
|