@antv/g 5.0.2 → 5.0.6
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.umd.js +1 -1
- package/es/Canvas.d.ts +14 -4
- package/es/Canvas.js +18 -10
- package/es/camera/Camera.d.ts +2 -1
- package/es/camera/Camera.js +13 -5
- package/es/components/Sortable.d.ts +4 -0
- package/es/components/Sortable.js +5 -0
- package/es/display-objects/CustomElement.d.ts +10 -11
- package/es/display-objects/CustomElement.js +20 -10
- package/es/display-objects/DisplayObject.d.ts +2 -5
- package/es/display-objects/DisplayObject.js +16 -9
- package/es/display-objects/Line.d.ts +4 -0
- package/es/display-objects/Line.js +2 -0
- package/es/dom/Document.d.ts +1 -1
- package/es/dom/Element.d.ts +9 -9
- package/es/dom/Element.js +7 -4
- package/es/dom/Node.d.ts +9 -9
- package/es/dom/interfaces.d.ts +13 -9
- package/es/dom/interfaces.js +5 -0
- package/es/global-module.d.ts +4 -0
- package/es/global-module.js +58 -71
- package/es/plugins/FrustumCullingStrategy.js +3 -1
- package/es/property-handlers/localPosition.js +4 -2
- package/es/services/RenderingService.d.ts +6 -0
- package/es/services/RenderingService.js +29 -1
- package/es/types.d.ts +8 -1
- package/es/utils/interpolation.js +10 -7
- package/lib/Canvas.d.ts +14 -4
- package/lib/Canvas.js +18 -10
- package/lib/camera/Camera.d.ts +2 -1
- package/lib/camera/Camera.js +14 -5
- package/lib/components/Sortable.d.ts +4 -0
- package/lib/components/Sortable.js +5 -0
- package/lib/display-objects/CustomElement.d.ts +10 -11
- package/lib/display-objects/CustomElement.js +20 -10
- package/lib/display-objects/DisplayObject.d.ts +2 -5
- package/lib/display-objects/DisplayObject.js +13 -8
- package/lib/display-objects/Line.d.ts +4 -0
- package/lib/display-objects/Line.js +2 -0
- package/lib/dom/Document.d.ts +1 -1
- package/lib/dom/Element.d.ts +9 -9
- package/lib/dom/Element.js +7 -4
- package/lib/dom/Node.d.ts +9 -9
- package/lib/dom/interfaces.d.ts +13 -9
- package/lib/dom/interfaces.js +5 -0
- package/lib/global-module.d.ts +4 -0
- package/lib/global-module.js +58 -71
- package/lib/plugins/FrustumCullingStrategy.js +2 -0
- package/lib/property-handlers/localPosition.js +4 -2
- package/lib/services/RenderingService.d.ts +6 -0
- package/lib/services/RenderingService.js +30 -1
- package/lib/types.d.ts +8 -1
- package/lib/utils/interpolation.js +7 -9
- package/package.json +3 -3
package/lib/types.d.ts
CHANGED
|
@@ -44,6 +44,10 @@ export interface BaseStyleProps {
|
|
|
44
44
|
* y in local space
|
|
45
45
|
*/
|
|
46
46
|
y?: number;
|
|
47
|
+
/**
|
|
48
|
+
* z in local space
|
|
49
|
+
*/
|
|
50
|
+
z?: number;
|
|
47
51
|
/**
|
|
48
52
|
* the origin of rotation and scaling, default to (0, 0)
|
|
49
53
|
*/
|
|
@@ -180,6 +184,10 @@ export interface CanvasConfig {
|
|
|
180
184
|
* @type {number}
|
|
181
185
|
*/
|
|
182
186
|
height: number;
|
|
187
|
+
/**
|
|
188
|
+
* 画布背景色
|
|
189
|
+
*/
|
|
190
|
+
background?: ColorType;
|
|
183
191
|
/**
|
|
184
192
|
* 是否可监听
|
|
185
193
|
* @type {boolean}
|
|
@@ -192,7 +200,6 @@ export interface CanvasConfig {
|
|
|
192
200
|
cursor?: Cursor;
|
|
193
201
|
[key: string]: any;
|
|
194
202
|
}
|
|
195
|
-
export declare type ChangeType = 'changeSize' | 'add' | 'sort' | 'clear' | 'attr' | 'show' | 'hide' | 'zIndex' | 'remove' | 'matrix' | 'clip';
|
|
196
203
|
declare type A = ['a' | 'A', number, number, number, number, number, number, number];
|
|
197
204
|
declare type C = ['c' | 'C', number, number, number, number, number, number];
|
|
198
205
|
declare type O = ['o' | 'O', number, number];
|
|
@@ -9,10 +9,12 @@ var _tslib = require("tslib");
|
|
|
9
9
|
|
|
10
10
|
var _globalModule = require("../global-module");
|
|
11
11
|
|
|
12
|
-
var _interfaces = require("../property-handlers/interfaces");
|
|
13
|
-
|
|
14
12
|
var _animation = require("./animation");
|
|
15
13
|
|
|
14
|
+
// import {
|
|
15
|
+
// StylePropertyMergerFactory,
|
|
16
|
+
// StylePropertyParserFactory,
|
|
17
|
+
// } from '../property-handlers/interfaces';
|
|
16
18
|
function convertEffectInput(keyframes, timing, target) {
|
|
17
19
|
var propertySpecificKeyframeGroups = makePropertySpecificKeyframeGroups(keyframes, timing);
|
|
18
20
|
var interpolations = makeInterpolations(propertySpecificKeyframeGroups, target);
|
|
@@ -115,15 +117,11 @@ function makeInterpolations(propertySpecificKeyframeGroups, target) {
|
|
|
115
117
|
|
|
116
118
|
function propertyInterpolation(property, left, right, target) {
|
|
117
119
|
var parsedLeft = left;
|
|
118
|
-
var parsedRight = right;
|
|
119
|
-
|
|
120
|
-
var parserFactory = _globalModule.globalContainer.get(_interfaces.StylePropertyParserFactory);
|
|
121
|
-
|
|
122
|
-
var parser = parserFactory(property);
|
|
120
|
+
var parsedRight = right; // const parserFactory = globalContainer.get<StylePropertyParserFactory>(StylePropertyParserFactory);
|
|
123
121
|
|
|
124
|
-
var
|
|
122
|
+
var parser = _globalModule.stylePropertyParserFactory[property]; // const mergerFactory = globalContainer.get<StylePropertyMergerFactory>(StylePropertyMergerFactory);
|
|
125
123
|
|
|
126
|
-
var merger =
|
|
124
|
+
var merger = _globalModule.stylePropertyMergerFactory[property]; // if (left == 'initial' || right == 'initial') {
|
|
127
125
|
// if (left == 'initial')
|
|
128
126
|
// left = initialValues[ucProperty];
|
|
129
127
|
// if (right == 'initial')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"description": "A core module including ECS and DI container.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://github.com/antvis/g#readme",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@antv/g-math": "^1.0.
|
|
40
|
+
"@antv/g-math": "^1.0.5",
|
|
41
41
|
"@antv/path-util": "^2.0.14",
|
|
42
42
|
"@antv/util": "^2.0.13",
|
|
43
43
|
"d3-color": "^1.4.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"scripts": {
|
|
51
51
|
"umd": "webpack"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "dce0982c006f8205d73b6537ef620b15218a47d0"
|
|
54
54
|
}
|