@antv/g-svg 1.8.18 → 1.8.20
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/ContextRegisterPlugin.d.ts.map +1 -1
- package/dist/SVGContextService.d.ts +4 -4
- package/dist/SVGContextService.d.ts.map +1 -1
- package/dist/index.esm.js +7 -17
- package/dist/index.js +6 -16
- package/dist/index.umd.js +1491 -1419
- package/dist/index.umd.min.js +4 -4
- package/package.json +8 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextRegisterPlugin.d.ts","sourceRoot":"","sources":["../src/ContextRegisterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ContextRegisterPlugin.d.ts","sourceRoot":"","sources":["../src/ContextRegisterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAGtD,qBAAa,qBAAsB,SAAQ,sBAAsB;IAC/D,IAAI,SAA0B;IAC9B,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { DataURLOptions } from '@antv/g-lite';
|
|
2
|
-
import {
|
|
1
|
+
import type { CanvasContext, DataURLOptions, GlobalRuntime } from '@antv/g-lite';
|
|
2
|
+
import type { ContextService } from '@antv/g-lite';
|
|
3
3
|
export declare class SVGContextService implements ContextService<SVGElement> {
|
|
4
|
-
private canvasConfig;
|
|
5
4
|
private $container;
|
|
6
5
|
private $namespace;
|
|
7
6
|
private dpr;
|
|
8
|
-
|
|
7
|
+
private canvasConfig;
|
|
8
|
+
constructor(context: GlobalRuntime & CanvasContext);
|
|
9
9
|
init(): Promise<void>;
|
|
10
10
|
getDomElement(): SVGElement;
|
|
11
11
|
getContext(): SVGElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SVGContextService.d.ts","sourceRoot":"","sources":["../src/SVGContextService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SVGContextService.d.ts","sourceRoot":"","sources":["../src/SVGContextService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEjF,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,cAAc,CAAC;AAIjE,qBAAa,iBAAkB,YAAW,cAAc,CAAC,UAAU,CAAC;IAClE,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,UAAU,CAAoB;IACtC,OAAO,CAAC,GAAG,CAAS;IAEpB,OAAO,CAAC,YAAY,CAAwB;gBAEhC,OAAO,EAAE,aAAa,GAAG,aAAa;IAI5C,IAAI;IAyBV,aAAa;IAIb,UAAU;IAIV,MAAM;IAIN,qBAAqB;IAIrB,OAAO;IAOP,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAQpC,gBAAgB,CAAC,MAAM,EAAE,MAAM;IAMzB,SAAS,CAAC,OAAO,GAAE,OAAO,CAAC,cAAc,CAAM;CAiBtD"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isBrowser, AbstractRendererPlugin, AbstractRenderer } from '@antv/g-lite';
|
|
2
2
|
import { Plugin as Plugin$1 } from '@antv/g-plugin-dom-interaction';
|
|
3
3
|
import * as DomInteraction from '@antv/g-plugin-dom-interaction';
|
|
4
4
|
export { DomInteraction };
|
|
@@ -8,7 +8,6 @@ export { SVGPicker };
|
|
|
8
8
|
import { createSVGElement, Plugin } from '@antv/g-plugin-svg-renderer';
|
|
9
9
|
import * as SVGRenderer from '@antv/g-plugin-svg-renderer';
|
|
10
10
|
export { SVGRenderer };
|
|
11
|
-
import { __decorate, __param } from 'tslib';
|
|
12
11
|
import { isString } from '@antv/util';
|
|
13
12
|
|
|
14
13
|
function _regeneratorRuntime() {
|
|
@@ -408,12 +407,12 @@ function _setPrototypeOf(o, p) {
|
|
|
408
407
|
}
|
|
409
408
|
|
|
410
409
|
var SVGContextService = /*#__PURE__*/function () {
|
|
411
|
-
function SVGContextService(
|
|
412
|
-
this.canvasConfig = void 0;
|
|
410
|
+
function SVGContextService(context) {
|
|
413
411
|
this.$container = void 0;
|
|
414
412
|
this.$namespace = void 0;
|
|
415
413
|
this.dpr = void 0;
|
|
416
|
-
this.canvasConfig =
|
|
414
|
+
this.canvasConfig = void 0;
|
|
415
|
+
this.canvasConfig = context.config;
|
|
417
416
|
}
|
|
418
417
|
|
|
419
418
|
var _proto = SVGContextService.prototype;
|
|
@@ -534,16 +533,6 @@ var SVGContextService = /*#__PURE__*/function () {
|
|
|
534
533
|
return SVGContextService;
|
|
535
534
|
}();
|
|
536
535
|
|
|
537
|
-
SVGContextService = __decorate([singleton({
|
|
538
|
-
token: ContextService
|
|
539
|
-
}), __param(0, inject(CanvasConfig))], SVGContextService);
|
|
540
|
-
|
|
541
|
-
var containerModule = Module(function (register) {
|
|
542
|
-
/**
|
|
543
|
-
* implements ContextService
|
|
544
|
-
*/
|
|
545
|
-
register(SVGContextService);
|
|
546
|
-
});
|
|
547
536
|
var ContextRegisterPlugin = /*#__PURE__*/function (_AbstractRendererPlug) {
|
|
548
537
|
_inheritsLoose(ContextRegisterPlugin, _AbstractRendererPlug);
|
|
549
538
|
|
|
@@ -562,11 +551,12 @@ var ContextRegisterPlugin = /*#__PURE__*/function (_AbstractRendererPlug) {
|
|
|
562
551
|
var _proto = ContextRegisterPlugin.prototype;
|
|
563
552
|
|
|
564
553
|
_proto.init = function init() {
|
|
565
|
-
|
|
554
|
+
// @ts-ignore
|
|
555
|
+
this.context.ContextService = SVGContextService;
|
|
566
556
|
};
|
|
567
557
|
|
|
568
558
|
_proto.destroy = function destroy() {
|
|
569
|
-
this.
|
|
559
|
+
delete this.context.ContextService;
|
|
570
560
|
};
|
|
571
561
|
|
|
572
562
|
return ContextRegisterPlugin;
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,6 @@ var gLite = require('@antv/g-lite');
|
|
|
6
6
|
var DomInteraction = require('@antv/g-plugin-dom-interaction');
|
|
7
7
|
var SVGPicker = require('@antv/g-plugin-svg-picker');
|
|
8
8
|
var SVGRenderer = require('@antv/g-plugin-svg-renderer');
|
|
9
|
-
var tslib = require('tslib');
|
|
10
9
|
var util = require('@antv/util');
|
|
11
10
|
|
|
12
11
|
function _interopNamespace(e) {
|
|
@@ -430,12 +429,12 @@ function _setPrototypeOf(o, p) {
|
|
|
430
429
|
}
|
|
431
430
|
|
|
432
431
|
var SVGContextService = /*#__PURE__*/function () {
|
|
433
|
-
function SVGContextService(
|
|
434
|
-
this.canvasConfig = void 0;
|
|
432
|
+
function SVGContextService(context) {
|
|
435
433
|
this.$container = void 0;
|
|
436
434
|
this.$namespace = void 0;
|
|
437
435
|
this.dpr = void 0;
|
|
438
|
-
this.canvasConfig =
|
|
436
|
+
this.canvasConfig = void 0;
|
|
437
|
+
this.canvasConfig = context.config;
|
|
439
438
|
}
|
|
440
439
|
|
|
441
440
|
var _proto = SVGContextService.prototype;
|
|
@@ -556,16 +555,6 @@ var SVGContextService = /*#__PURE__*/function () {
|
|
|
556
555
|
return SVGContextService;
|
|
557
556
|
}();
|
|
558
557
|
|
|
559
|
-
SVGContextService = tslib.__decorate([gLite.singleton({
|
|
560
|
-
token: gLite.ContextService
|
|
561
|
-
}), tslib.__param(0, gLite.inject(gLite.CanvasConfig))], SVGContextService);
|
|
562
|
-
|
|
563
|
-
var containerModule = gLite.Module(function (register) {
|
|
564
|
-
/**
|
|
565
|
-
* implements ContextService
|
|
566
|
-
*/
|
|
567
|
-
register(SVGContextService);
|
|
568
|
-
});
|
|
569
558
|
var ContextRegisterPlugin = /*#__PURE__*/function (_AbstractRendererPlug) {
|
|
570
559
|
_inheritsLoose(ContextRegisterPlugin, _AbstractRendererPlug);
|
|
571
560
|
|
|
@@ -584,11 +573,12 @@ var ContextRegisterPlugin = /*#__PURE__*/function (_AbstractRendererPlug) {
|
|
|
584
573
|
var _proto = ContextRegisterPlugin.prototype;
|
|
585
574
|
|
|
586
575
|
_proto.init = function init() {
|
|
587
|
-
|
|
576
|
+
// @ts-ignore
|
|
577
|
+
this.context.ContextService = SVGContextService;
|
|
588
578
|
};
|
|
589
579
|
|
|
590
580
|
_proto.destroy = function destroy() {
|
|
591
|
-
this.
|
|
581
|
+
delete this.context.ContextService;
|
|
592
582
|
};
|
|
593
583
|
|
|
594
584
|
return ContextRegisterPlugin;
|