@antv/g 5.0.21 → 5.0.22-alpha.2
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/es/AbstractRenderer.js +1 -3
- package/es/Canvas.js +7 -11
- package/es/DisplayObjectPool.js +1 -3
- package/es/camera/Camera.d.ts +12 -7
- package/es/camera/Camera.js +54 -24
- package/es/camera/Landmark.d.ts +2 -0
- package/es/camera/Landmark.js +10 -6
- package/es/components/Cullable.js +1 -3
- package/es/components/Geometry.js +1 -3
- package/es/components/Renderable.js +1 -3
- package/es/components/Sortable.js +1 -3
- package/es/components/Transform.js +1 -3
- package/es/css/LayoutRegistry.js +1 -3
- package/es/css/StyleValueRegistry.js +1 -3
- package/es/css/cssom/CSSColorValue.js +1 -3
- package/es/css/cssom/CSSGradientValue.js +6 -8
- package/es/css/cssom/CSSKeywordValue.js +1 -3
- package/es/css/cssom/CSSMathInvert.js +1 -3
- package/es/css/cssom/CSSMathMax.js +1 -3
- package/es/css/cssom/CSSMathMin.js +1 -3
- package/es/css/cssom/CSSMathNegate.js +1 -3
- package/es/css/cssom/CSSMathProduct.js +1 -3
- package/es/css/cssom/CSSMathSum.js +1 -3
- package/es/css/cssom/CSSMathValue.js +1 -3
- package/es/css/cssom/CSSMathVariadic.js +1 -3
- package/es/css/cssom/CSSNumericValue.js +1 -3
- package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/es/css/cssom/CSSNumericValueType.js +1 -3
- package/es/css/cssom/CSSRGB.js +2 -4
- package/es/css/cssom/CSSStyleValue.d.ts +2 -2
- package/es/css/cssom/CSSStyleValue.js +2 -4
- package/es/css/cssom/CSSTransformComponent.js +1 -3
- package/es/css/cssom/CSSTransformValue.js +1 -3
- package/es/css/cssom/CSSTranslate.js +1 -3
- package/es/css/cssom/CSSUnitValue.js +2 -4
- package/es/css/parser/color.js +1 -1
- package/es/css/parser/dimension.js +1 -1
- package/es/css/parser/transform.d.ts +1 -1
- package/es/css/parser/transform.js +2 -2
- package/es/css/properties/CSSPropertyAnchor.js +1 -3
- package/es/css/properties/CSSPropertyClipPath.js +1 -3
- package/es/css/properties/CSSPropertyColor.js +1 -3
- package/es/css/properties/CSSPropertyFilter.js +1 -3
- package/es/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
- package/es/css/properties/CSSPropertyLineDash.js +1 -3
- package/es/css/properties/CSSPropertyLocalPosition.js +1 -3
- package/es/css/properties/CSSPropertyOffsetDistance.js +1 -3
- package/es/css/properties/CSSPropertyOffsetPath.js +1 -3
- package/es/css/properties/CSSPropertyOpacity.js +1 -3
- package/es/css/properties/CSSPropertyPath.js +1 -3
- package/es/css/properties/CSSPropertyPoints.js +1 -3
- package/es/css/properties/CSSPropertyShadowBlur.js +1 -3
- package/es/css/properties/CSSPropertyText.js +2 -4
- package/es/css/properties/CSSPropertyTextTransform.js +1 -3
- package/es/css/properties/CSSPropertyTransform.js +1 -3
- package/es/css/properties/CSSPropertyTransformOrigin.js +1 -3
- package/es/css/properties/CSSPropertyVisibility.js +1 -3
- package/es/css/properties/CSSPropertyZIndex.js +1 -3
- package/es/display-objects/Circle.js +1 -3
- package/es/display-objects/CustomElement.js +1 -3
- package/es/display-objects/DisplayObject.js +10 -8
- package/es/display-objects/Ellipse.js +1 -3
- package/es/display-objects/Group.js +1 -3
- package/es/display-objects/HTML.js +3 -6
- package/es/display-objects/Image.js +1 -3
- package/es/display-objects/Line.js +1 -3
- package/es/display-objects/Path.js +1 -3
- package/es/display-objects/Polygon.js +1 -3
- package/es/display-objects/Polyline.js +1 -3
- package/es/display-objects/Rect.js +1 -3
- package/es/display-objects/Text.js +3 -6
- package/es/dom/Animation.js +2 -4
- package/es/dom/AnimationEffectTiming.js +1 -3
- package/es/dom/AnimationEvent.js +1 -3
- package/es/dom/AnimationTimeline.js +1 -3
- package/es/dom/CustomElementRegistry.js +1 -3
- package/es/dom/CustomEvent.js +1 -3
- package/es/dom/Document.js +1 -3
- package/es/dom/Element.js +4 -6
- package/es/dom/EventTarget.js +3 -5
- package/es/dom/FederatedEvent.js +1 -3
- package/es/dom/FederatedMouseEvent.js +1 -3
- package/es/dom/FederatedPointerEvent.js +1 -3
- package/es/dom/FederatedWheelEvent.js +1 -3
- package/es/dom/KeyframeEffect.js +1 -3
- package/es/dom/KeyframeList.js +1 -1
- package/es/dom/MutationEvent.js +1 -3
- package/es/dom/MutationObserver.js +3 -10
- package/es/dom/MutationRecord.js +1 -3
- package/es/dom/Node.js +2 -4
- package/es/plugins/CullingPlugin.js +1 -3
- package/es/plugins/DirtyCheckPlugin.js +1 -3
- package/es/plugins/EventPlugin.js +5 -4
- package/es/plugins/FrustumCullingStrategy.js +1 -3
- package/es/plugins/PrepareRendererPlugin.js +1 -3
- package/es/services/EventService.js +26 -7
- package/es/services/OffscreenCanvasCreator.js +1 -3
- package/es/services/RenderingContext.d.ts +2 -1
- package/es/services/RenderingContext.js +3 -1
- package/es/services/RenderingService.js +1 -3
- package/es/services/SceneGraphSelector.js +1 -3
- package/es/services/SceneGraphService.d.ts +2 -1
- package/es/services/SceneGraphService.js +3 -5
- package/es/services/TextService.js +3 -5
- package/es/services/aabb/CircleUpdater.js +1 -3
- package/es/services/aabb/EllipseUpdater.js +1 -3
- package/es/services/aabb/LineUpdater.js +1 -3
- package/es/services/aabb/PathUpdater.js +1 -3
- package/es/services/aabb/PolylineUpdater.js +1 -3
- package/es/services/aabb/RectUpdater.js +1 -3
- package/es/services/aabb/TextUpdater.js +1 -3
- package/es/services/aabb/interfaces.d.ts +3 -2
- package/es/services/aabb/interfaces.js +3 -2
- package/es/shapes/AABB.js +1 -3
- package/es/shapes/BoundingSphere.js +1 -3
- package/es/shapes/Frustum.js +1 -3
- package/es/shapes/Plane.js +1 -3
- package/es/shapes/Point.js +1 -3
- package/es/shapes/Ray.js +1 -3
- package/es/shapes/Rectangle.js +1 -3
- package/es/types.d.ts +2 -1
- package/es/types.js +2 -1
- package/es/utils/custom-easing.d.ts +0 -9
- package/es/utils/custom-easing.js +38 -54
- package/es/utils/path.d.ts +1 -1
- package/es/utils/path.js +3 -3
- package/es/utils/text.js +3 -3
- package/lib/AbstractRenderer.js +1 -3
- package/lib/Canvas.js +8 -12
- package/lib/DisplayObjectPool.js +1 -3
- package/lib/camera/Camera.d.ts +12 -7
- package/lib/camera/Camera.js +59 -25
- package/lib/camera/Landmark.d.ts +2 -0
- package/lib/camera/Landmark.js +10 -6
- package/lib/components/Cullable.js +2 -4
- package/lib/components/Geometry.js +1 -3
- package/lib/components/Renderable.js +1 -3
- package/lib/components/Sortable.js +1 -3
- package/lib/components/Transform.js +1 -3
- package/lib/css/LayoutRegistry.js +1 -3
- package/lib/css/StyleValueRegistry.js +1 -3
- package/lib/css/cssom/CSSColorValue.js +1 -3
- package/lib/css/cssom/CSSGradientValue.js +7 -9
- package/lib/css/cssom/CSSKeywordValue.js +1 -3
- package/lib/css/cssom/CSSMathInvert.js +1 -3
- package/lib/css/cssom/CSSMathMax.js +1 -3
- package/lib/css/cssom/CSSMathMin.js +1 -3
- package/lib/css/cssom/CSSMathNegate.js +1 -3
- package/lib/css/cssom/CSSMathOperator.js +1 -1
- package/lib/css/cssom/CSSMathProduct.js +1 -3
- package/lib/css/cssom/CSSMathSum.js +1 -3
- package/lib/css/cssom/CSSMathValue.js +1 -3
- package/lib/css/cssom/CSSMathVariadic.js +2 -4
- package/lib/css/cssom/CSSNumericValue.js +1 -3
- package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/lib/css/cssom/CSSNumericValueType.js +3 -5
- package/lib/css/cssom/CSSRGB.js +2 -4
- package/lib/css/cssom/CSSStyleValue.d.ts +2 -2
- package/lib/css/cssom/CSSStyleValue.js +108 -110
- package/lib/css/cssom/CSSTransformComponent.js +2 -4
- package/lib/css/cssom/CSSTransformValue.js +1 -3
- package/lib/css/cssom/CSSTranslate.js +1 -3
- package/lib/css/cssom/CSSUnitValue.js +2 -4
- package/lib/css/cssom/types.js +1 -1
- package/lib/css/parser/color.js +3 -3
- package/lib/css/parser/dimension.js +6 -7
- package/lib/css/parser/numeric.js +3 -3
- package/lib/css/parser/path.js +1 -1
- package/lib/css/parser/transform.d.ts +1 -1
- package/lib/css/parser/transform.js +11 -11
- package/lib/css/properties/CSSPropertyAnchor.js +1 -3
- package/lib/css/properties/CSSPropertyClipPath.js +1 -3
- package/lib/css/properties/CSSPropertyColor.js +1 -3
- package/lib/css/properties/CSSPropertyFilter.js +1 -3
- package/lib/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
- package/lib/css/properties/CSSPropertyLineDash.js +1 -3
- package/lib/css/properties/CSSPropertyLocalPosition.js +1 -3
- package/lib/css/properties/CSSPropertyOffsetDistance.js +1 -3
- package/lib/css/properties/CSSPropertyOffsetPath.js +1 -3
- package/lib/css/properties/CSSPropertyOpacity.js +1 -3
- package/lib/css/properties/CSSPropertyPath.js +1 -3
- package/lib/css/properties/CSSPropertyPoints.js +1 -3
- package/lib/css/properties/CSSPropertyShadowBlur.js +1 -3
- package/lib/css/properties/CSSPropertyText.js +2 -4
- package/lib/css/properties/CSSPropertyTextTransform.js +1 -3
- package/lib/css/properties/CSSPropertyTransform.js +1 -3
- package/lib/css/properties/CSSPropertyTransformOrigin.js +1 -3
- package/lib/css/properties/CSSPropertyVisibility.js +1 -3
- package/lib/css/properties/CSSPropertyZIndex.js +1 -3
- package/lib/display-objects/Circle.js +1 -3
- package/lib/display-objects/CustomElement.js +1 -3
- package/lib/display-objects/DisplayObject.js +9 -7
- package/lib/display-objects/Ellipse.js +1 -3
- package/lib/display-objects/Group.js +1 -3
- package/lib/display-objects/HTML.js +4 -6
- package/lib/display-objects/Image.js +1 -3
- package/lib/display-objects/Line.js +1 -3
- package/lib/display-objects/Path.js +1 -3
- package/lib/display-objects/Polygon.js +1 -3
- package/lib/display-objects/Polyline.js +1 -3
- package/lib/display-objects/Rect.js +1 -3
- package/lib/display-objects/Text.js +4 -6
- package/lib/dom/Animation.js +2 -4
- package/lib/dom/AnimationEffectTiming.js +1 -3
- package/lib/dom/AnimationEvent.js +1 -3
- package/lib/dom/AnimationTimeline.js +2 -4
- package/lib/dom/CustomElementRegistry.js +1 -3
- package/lib/dom/CustomEvent.js +1 -3
- package/lib/dom/Document.js +1 -3
- package/lib/dom/Element.js +4 -6
- package/lib/dom/EventTarget.js +3 -5
- package/lib/dom/FederatedEvent.js +1 -3
- package/lib/dom/FederatedMouseEvent.js +1 -3
- package/lib/dom/FederatedPointerEvent.js +1 -3
- package/lib/dom/FederatedWheelEvent.js +1 -3
- package/lib/dom/KeyframeEffect.js +2 -4
- package/lib/dom/KeyframeList.js +1 -1
- package/lib/dom/MutationEvent.js +1 -3
- package/lib/dom/MutationObserver.js +4 -11
- package/lib/dom/MutationRecord.js +1 -3
- package/lib/dom/Node.js +2 -4
- package/lib/index.js +1 -1
- package/lib/plugins/CullingPlugin.js +2 -4
- package/lib/plugins/DirtyCheckPlugin.js +1 -3
- package/lib/plugins/EventPlugin.js +5 -4
- package/lib/plugins/FrustumCullingStrategy.js +1 -3
- package/lib/plugins/PrepareRendererPlugin.js +1 -3
- package/lib/services/EventService.js +26 -7
- package/lib/services/OffscreenCanvasCreator.js +1 -3
- package/lib/services/RenderingContext.d.ts +2 -1
- package/lib/services/RenderingContext.js +4 -1
- package/lib/services/RenderingService.js +1 -3
- package/lib/services/SceneGraphSelector.js +2 -4
- package/lib/services/SceneGraphService.d.ts +2 -1
- package/lib/services/SceneGraphService.js +5 -6
- package/lib/services/TextService.js +3 -5
- package/lib/services/aabb/CircleUpdater.js +1 -3
- package/lib/services/aabb/EllipseUpdater.js +1 -3
- package/lib/services/aabb/LineUpdater.js +1 -3
- package/lib/services/aabb/PathUpdater.js +1 -3
- package/lib/services/aabb/PolylineUpdater.js +1 -3
- package/lib/services/aabb/RectUpdater.js +1 -3
- package/lib/services/aabb/TextUpdater.js +1 -3
- package/lib/services/aabb/index.js +10 -10
- package/lib/services/aabb/interfaces.d.ts +3 -2
- package/lib/services/aabb/interfaces.js +9 -3
- package/lib/shapes/AABB.js +1 -3
- package/lib/shapes/BoundingSphere.js +1 -3
- package/lib/shapes/Frustum.js +2 -4
- package/lib/shapes/Plane.js +1 -3
- package/lib/shapes/Point.js +1 -3
- package/lib/shapes/Ray.js +1 -3
- package/lib/shapes/Rectangle.js +1 -3
- package/lib/types.d.ts +2 -1
- package/lib/types.js +6 -2
- package/lib/utils/animation.js +2 -3
- package/lib/utils/bezier-easing.js +1 -1
- package/lib/utils/custom-easing.d.ts +0 -9
- package/lib/utils/custom-easing.js +42 -66
- package/lib/utils/math.js +9 -9
- package/lib/utils/path.d.ts +1 -1
- package/lib/utils/path.js +6 -6
- package/lib/utils/text.js +3 -3
- package/package.json +3 -3
- package/dist/index.umd.min.js +0 -30
|
@@ -6,9 +6,7 @@ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
|
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSTransformValue
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CSSTransformValue =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
9
|
+
var CSSTransformValue = function (_super) {
|
|
12
10
|
__extends(CSSTransformValue, _super);
|
|
13
11
|
|
|
14
12
|
function CSSTransformValue(transforms) {
|
|
@@ -8,9 +8,7 @@ import { CSSTransformComponent } from './CSSTransformComponent'; // import { Uni
|
|
|
8
8
|
* @see https://drafts.css-houdini.org/css-typed-om/#csstranslate
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var CSSTranslate =
|
|
12
|
-
/** @class */
|
|
13
|
-
function (_super) {
|
|
11
|
+
var CSSTranslate = function (_super) {
|
|
14
12
|
__extends(CSSTranslate, _super);
|
|
15
13
|
|
|
16
14
|
function CSSTranslate(x, y, z, is2D) {
|
|
@@ -17,9 +17,7 @@ import { CSSStyleValue } from './CSSStyleValue';
|
|
|
17
17
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
var CSSUnitValue =
|
|
21
|
-
/** @class */
|
|
22
|
-
function (_super) {
|
|
20
|
+
var CSSUnitValue = function (_super) {
|
|
23
21
|
__extends(CSSUnitValue, _super);
|
|
24
22
|
|
|
25
23
|
function CSSUnitValue(value, unitOrName) {
|
|
@@ -237,7 +235,7 @@ function (_super) {
|
|
|
237
235
|
text = CSSUnitValue.formatNumber(value, unit_1);
|
|
238
236
|
}
|
|
239
237
|
} else {
|
|
240
|
-
text = ""
|
|
238
|
+
text = "" + value + unit;
|
|
241
239
|
}
|
|
242
240
|
}
|
|
243
241
|
}
|
package/es/css/parser/color.js
CHANGED
|
@@ -4,7 +4,7 @@ import { rad2deg, turn2deg } from '../../utils';
|
|
|
4
4
|
import { UnitType } from '../cssom';
|
|
5
5
|
import { CSSUnitValue } from '../cssom';
|
|
6
6
|
export function parseDimension(unitRegExp, string) {
|
|
7
|
-
string = ""
|
|
7
|
+
string = ("" + string).trim().toLowerCase();
|
|
8
8
|
|
|
9
9
|
if (isFinite(Number(string))) {
|
|
10
10
|
if ('px'.search(unitRegExp) >= 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UnitType } from '../cssom';
|
|
1
|
+
import { parseNumber, mergeNumbers, parseAngle, parseLength, parseLengthOrPercentage, mergeDimensions } from './';
|
|
2
|
+
import { UnitType, CSSUnitValue } from '../cssom';
|
|
3
3
|
var _ = null;
|
|
4
4
|
export var Opx = new CSSUnitValue(0, 'px');
|
|
5
5
|
export var Odeg = new CSSUnitValue(0, 'deg');
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { CSSUnitValue, parseNumberList } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyAnchor =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyAnchor = function () {
|
|
8
6
|
function CSSPropertyAnchor() {
|
|
9
7
|
this.parser = parseNumberList;
|
|
10
8
|
}
|
|
@@ -19,9 +19,7 @@ import { dirtifyToRoot } from '../..';
|
|
|
19
19
|
});
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
var CSSPropertyClipPath =
|
|
23
|
-
/** @class */
|
|
24
|
-
function () {
|
|
22
|
+
var CSSPropertyClipPath = function () {
|
|
25
23
|
function CSSPropertyClipPath() {}
|
|
26
24
|
|
|
27
25
|
CSSPropertyClipPath.prototype.calculator = function (name, oldClipPath, newClipPath, object) {
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parseFilter } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyFilter =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyFilter = function () {
|
|
8
6
|
function CSSPropertyFilter() {
|
|
9
7
|
this.parser = parseFilter;
|
|
10
8
|
}
|
|
@@ -5,9 +5,7 @@ import { UnitType, CSSUnitValue, parseLengthOrPercentage, mergeDimensions } from
|
|
|
5
5
|
* <length> & <percentage>
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var CSSPropertyLengthOrPercentage =
|
|
9
|
-
/** @class */
|
|
10
|
-
function () {
|
|
8
|
+
var CSSPropertyLengthOrPercentage = function () {
|
|
11
9
|
function CSSPropertyLengthOrPercentage() {
|
|
12
10
|
this.parser = parseLengthOrPercentage;
|
|
13
11
|
this.mixer = mergeDimensions;
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parseDimensionArray, mergeDimensionList } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyLineDash =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyLineDash = function () {
|
|
8
6
|
function CSSPropertyLineDash() {
|
|
9
7
|
this.parser = parseDimensionArray;
|
|
10
8
|
this.mixer = mergeDimensionList;
|
|
@@ -6,9 +6,7 @@ import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
|
|
|
6
6
|
* local position
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CSSPropertyLocalPosition =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
9
|
+
var CSSPropertyLocalPosition = function (_super) {
|
|
12
10
|
__extends(CSSPropertyLocalPosition, _super);
|
|
13
11
|
|
|
14
12
|
function CSSPropertyLocalPosition() {
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parseNumber, clampedMergeNumbers, Shape } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyOffsetDistance =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyOffsetDistance = function () {
|
|
8
6
|
function CSSPropertyOffsetDistance() {
|
|
9
7
|
this.parser = parseNumber;
|
|
10
8
|
this.mixer = clampedMergeNumbers(0, 1);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
|
|
4
|
-
var CSSPropertyOffsetPath =
|
|
5
|
-
/** @class */
|
|
6
|
-
function () {
|
|
4
|
+
var CSSPropertyOffsetPath = function () {
|
|
7
5
|
function CSSPropertyOffsetPath() {}
|
|
8
6
|
|
|
9
7
|
CSSPropertyOffsetPath.prototype.calculator = function (name, oldOffsetPath, newOffsetPath, object) {
|
|
@@ -5,9 +5,7 @@ import { parseNumber, clampedMergeNumbers } from '../..';
|
|
|
5
5
|
* opacity
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var CSSPropertyOpacity =
|
|
9
|
-
/** @class */
|
|
10
|
-
function () {
|
|
8
|
+
var CSSPropertyOpacity = function () {
|
|
11
9
|
function CSSPropertyOpacity() {
|
|
12
10
|
this.parser = parseNumber;
|
|
13
11
|
this.mixer = clampedMergeNumbers(0, 1);
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parsePath, mergePaths, CSSKeywordValue, Rectangle } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyPath =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyPath = function () {
|
|
8
6
|
function CSSPropertyPath() {
|
|
9
7
|
/**
|
|
10
8
|
* path2Curve
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parsePoints } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyPoints =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyPoints = function () {
|
|
8
6
|
function CSSPropertyPoints() {
|
|
9
7
|
this.parser = parsePoints;
|
|
10
8
|
}
|
|
@@ -3,9 +3,7 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { clampedMergeNumbers } from '../..';
|
|
4
4
|
import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
|
|
5
5
|
|
|
6
|
-
var CSSPropertyShadowBlur =
|
|
7
|
-
/** @class */
|
|
8
|
-
function (_super) {
|
|
6
|
+
var CSSPropertyShadowBlur = function (_super) {
|
|
9
7
|
__extends(CSSPropertyShadowBlur, _super);
|
|
10
8
|
|
|
11
9
|
function CSSPropertyShadowBlur() {
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { CSSKeywordValue } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyText =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyText = function () {
|
|
8
6
|
function CSSPropertyText() {}
|
|
9
7
|
|
|
10
8
|
CSSPropertyText.prototype.calculator = function (name, oldParsed, parsed, object) {
|
|
@@ -20,7 +18,7 @@ function () {
|
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
CSSPropertyText.prototype.postProcessor = function (object) {
|
|
23
|
-
object.nodeValue = ""
|
|
21
|
+
object.nodeValue = "" + object.parsedStyle.text || '';
|
|
24
22
|
};
|
|
25
23
|
|
|
26
24
|
CSSPropertyText = __decorate([singleton()], CSSPropertyText);
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { TextTransform, Shape } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyTextTransform =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyTextTransform = function () {
|
|
8
6
|
function CSSPropertyTextTransform() {}
|
|
9
7
|
|
|
10
8
|
CSSPropertyTextTransform.prototype.postProcessor = function (o) {
|
|
@@ -34,9 +34,7 @@ import { CSSKeywordValue } from '../cssom';
|
|
|
34
34
|
* * perspective
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
var CSSPropertyTransform =
|
|
38
|
-
/** @class */
|
|
39
|
-
function () {
|
|
37
|
+
var CSSPropertyTransform = function () {
|
|
40
38
|
function CSSPropertyTransform() {
|
|
41
39
|
this.parser = parseTransform;
|
|
42
40
|
this.mixer = mergeTransforms;
|
|
@@ -7,9 +7,7 @@ import { parseTransformOrigin } from '../..';
|
|
|
7
7
|
* [10px, 10px] [10%, 10%]
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var CSSPropertyTransformOrigin =
|
|
11
|
-
/** @class */
|
|
12
|
-
function () {
|
|
10
|
+
var CSSPropertyTransformOrigin = function () {
|
|
13
11
|
function CSSPropertyTransformOrigin() {
|
|
14
12
|
this.parser = parseTransformOrigin;
|
|
15
13
|
}
|
|
@@ -8,9 +8,7 @@ import { singleton } from 'mana-syringe';
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var CSSPropertyVisibility =
|
|
12
|
-
/** @class */
|
|
13
|
-
function () {
|
|
11
|
+
var CSSPropertyVisibility = function () {
|
|
14
12
|
function CSSPropertyVisibility() {}
|
|
15
13
|
|
|
16
14
|
CSSPropertyVisibility.prototype.calculator = function (name, oldParsed, parsed, object) {
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parseNumber } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyZIndex =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyZIndex = function () {
|
|
8
6
|
function CSSPropertyZIndex() {
|
|
9
7
|
this.parser = parseNumber;
|
|
10
8
|
}
|
|
@@ -2,9 +2,7 @@ import { __assign, __extends, __rest } from "tslib";
|
|
|
2
2
|
import { Shape } from '../types';
|
|
3
3
|
import { DisplayObject } from './DisplayObject';
|
|
4
4
|
|
|
5
|
-
var Circle =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
5
|
+
var Circle = function (_super) {
|
|
8
6
|
__extends(Circle, _super);
|
|
9
7
|
|
|
10
8
|
function Circle(_a) {
|
|
@@ -6,9 +6,7 @@ import { ElementEvent } from '../dom/interfaces';
|
|
|
6
6
|
* @see https://yuque.antfin-inc.com/antv/czqvg5/pgqipg
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CustomElement =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
9
|
+
var CustomElement = function (_super) {
|
|
12
10
|
__extends(CustomElement, _super); // private shadowNodes: DisplayObject[] = [];
|
|
13
11
|
|
|
14
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __extends, __read, __spreadArray } from "tslib";
|
|
2
2
|
import { GlobalContainer } from 'mana-syringe';
|
|
3
|
-
import { isEqual, isNil, isObject } from '@antv/util';
|
|
3
|
+
import { isEqual, isNil, isObject, isUndefined } from '@antv/util';
|
|
4
4
|
import { mat4, quat, vec3 } from 'gl-matrix';
|
|
5
5
|
import { DisplayObjectPool } from '../DisplayObjectPool';
|
|
6
6
|
import { KeyframeEffect } from '../dom/KeyframeEffect';
|
|
@@ -56,17 +56,14 @@ var DEFAULT_STYLE_PROPS = {
|
|
|
56
56
|
* * attributeChanged
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
|
-
var DisplayObject =
|
|
60
|
-
/** @class */
|
|
61
|
-
function (_super) {
|
|
59
|
+
var DisplayObject = function (_super) {
|
|
62
60
|
__extends(DisplayObject, _super);
|
|
63
61
|
|
|
64
62
|
function DisplayObject(config) {
|
|
65
|
-
var _this = this;
|
|
66
|
-
|
|
67
63
|
var _a, _b, _c;
|
|
68
64
|
|
|
69
|
-
_this = _super.call(this) || this;
|
|
65
|
+
var _this = _super.call(this) || this;
|
|
66
|
+
|
|
70
67
|
_this.styleValueRegistry = GlobalContainer.get(StyleValueRegistry);
|
|
71
68
|
/**
|
|
72
69
|
* push to active animations after calling `animate()`
|
|
@@ -186,7 +183,12 @@ function (_super) {
|
|
|
186
183
|
|
|
187
184
|
var _a = __read(formatAttribute(name, value), 2),
|
|
188
185
|
attributeName = _a[0],
|
|
189
|
-
attributeValue = _a[1];
|
|
186
|
+
attributeValue = _a[1]; // ignore undefined value
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
if (isUndefined(value)) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
190
192
|
|
|
191
193
|
if (force || !isEqual(attributeValue, this.attributes[attributeName])) {
|
|
192
194
|
this.internalSetAttribute(attributeName, attributeValue);
|
|
@@ -2,9 +2,7 @@ import { __assign, __extends, __rest } from "tslib";
|
|
|
2
2
|
import { Shape } from '../types';
|
|
3
3
|
import { DisplayObject } from './DisplayObject';
|
|
4
4
|
|
|
5
|
-
var Ellipse =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
5
|
+
var Ellipse = function (_super) {
|
|
8
6
|
__extends(Ellipse, _super);
|
|
9
7
|
|
|
10
8
|
function Ellipse(_a) {
|
|
@@ -8,9 +8,7 @@ import { mat4, vec3 } from 'gl-matrix';
|
|
|
8
8
|
* @see https://github.com/pmndrs/drei#html
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var HTML =
|
|
12
|
-
/** @class */
|
|
13
|
-
function (_super) {
|
|
11
|
+
var HTML = function (_super) {
|
|
14
12
|
__extends(HTML, _super);
|
|
15
13
|
|
|
16
14
|
function HTML(_a) {
|
|
@@ -18,12 +16,10 @@ function (_super) {
|
|
|
18
16
|
_a = {};
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
var _this = this;
|
|
22
|
-
|
|
23
19
|
var style = _a.style,
|
|
24
20
|
rest = __rest(_a, ["style"]);
|
|
25
21
|
|
|
26
|
-
_this = _super.call(this, __assign({
|
|
22
|
+
var _this = _super.call(this, __assign({
|
|
27
23
|
type: Shape.HTML,
|
|
28
24
|
style: __assign({
|
|
29
25
|
innerHTML: '',
|
|
@@ -31,6 +27,7 @@ function (_super) {
|
|
|
31
27
|
style: ''
|
|
32
28
|
}, style)
|
|
33
29
|
}, rest)) || this;
|
|
30
|
+
|
|
34
31
|
_this.cullable.enable = false;
|
|
35
32
|
return _this;
|
|
36
33
|
}
|
|
@@ -2,9 +2,7 @@ import { __assign, __extends, __rest } from "tslib";
|
|
|
2
2
|
import { Shape } from '../types';
|
|
3
3
|
import { DisplayObject } from './DisplayObject';
|
|
4
4
|
|
|
5
|
-
var Image =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
5
|
+
var Image = function (_super) {
|
|
8
6
|
__extends(Image, _super);
|
|
9
7
|
|
|
10
8
|
function Image(_a) {
|
|
@@ -5,9 +5,7 @@ import { Point } from '../shapes';
|
|
|
5
5
|
import { Cubic as CubicUtil } from '@antv/g-math';
|
|
6
6
|
import { isNil } from '@antv/util';
|
|
7
7
|
|
|
8
|
-
var Path =
|
|
9
|
-
/** @class */
|
|
10
|
-
function (_super) {
|
|
8
|
+
var Path = function (_super) {
|
|
11
9
|
__extends(Path, _super);
|
|
12
10
|
|
|
13
11
|
function Path(_a) {
|
|
@@ -2,9 +2,7 @@ import { __assign, __extends, __rest } from "tslib";
|
|
|
2
2
|
import { Shape } from '../types';
|
|
3
3
|
import { DisplayObject } from './DisplayObject';
|
|
4
4
|
|
|
5
|
-
var Polygon =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
5
|
+
var Polygon = function (_super) {
|
|
8
6
|
__extends(Polygon, _super);
|
|
9
7
|
|
|
10
8
|
function Polygon(_a) {
|
|
@@ -4,9 +4,7 @@ import { Shape } from '../types';
|
|
|
4
4
|
import { DisplayObject } from './DisplayObject';
|
|
5
5
|
import { Point } from '../shapes';
|
|
6
6
|
|
|
7
|
-
var Polyline =
|
|
8
|
-
/** @class */
|
|
9
|
-
function (_super) {
|
|
7
|
+
var Polyline = function (_super) {
|
|
10
8
|
__extends(Polyline, _super);
|
|
11
9
|
|
|
12
10
|
function Polyline(_a) {
|
|
@@ -2,9 +2,7 @@ import { __assign, __extends, __rest } from "tslib";
|
|
|
2
2
|
import { Shape } from '../types';
|
|
3
3
|
import { DisplayObject } from './DisplayObject';
|
|
4
4
|
|
|
5
|
-
var Rect =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
5
|
+
var Rect = function (_super) {
|
|
8
6
|
__extends(Rect, _super);
|
|
9
7
|
|
|
10
8
|
function Rect(_a) {
|
|
@@ -5,9 +5,7 @@ import { DisplayObject } from './DisplayObject';
|
|
|
5
5
|
* <text> @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var Text =
|
|
9
|
-
/** @class */
|
|
10
|
-
function (_super) {
|
|
8
|
+
var Text = function (_super) {
|
|
11
9
|
__extends(Text, _super);
|
|
12
10
|
|
|
13
11
|
function Text(_a) {
|
|
@@ -15,12 +13,10 @@ function (_super) {
|
|
|
15
13
|
_a = {};
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
var _this = this;
|
|
19
|
-
|
|
20
16
|
var style = _a.style,
|
|
21
17
|
rest = __rest(_a, ["style"]);
|
|
22
18
|
|
|
23
|
-
_this = _super.call(this, __assign({
|
|
19
|
+
var _this = _super.call(this, __assign({
|
|
24
20
|
type: Shape.TEXT,
|
|
25
21
|
style: __assign({
|
|
26
22
|
text: '',
|
|
@@ -56,6 +52,7 @@ function (_super) {
|
|
|
56
52
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
|
|
57
53
|
*/
|
|
58
54
|
|
|
55
|
+
|
|
59
56
|
_this.LENGTHADJUST_SPACING = 1;
|
|
60
57
|
_this.LENGTHADJUST_SPACINGANDGLYPHS = 2;
|
|
61
58
|
_this.LENGTHADJUST_UNKNOWN = 0;
|
package/es/dom/Animation.js
CHANGED
|
@@ -4,9 +4,7 @@ var sequenceNumber = 0;
|
|
|
4
4
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
var Animation =
|
|
8
|
-
/** @class */
|
|
9
|
-
function () {
|
|
7
|
+
var Animation = function () {
|
|
10
8
|
function Animation(effect, timeline) {
|
|
11
9
|
this.currentTimePending = false;
|
|
12
10
|
/**
|
|
@@ -23,7 +21,7 @@ function () {
|
|
|
23
21
|
this.effect = effect;
|
|
24
22
|
effect.animation = this;
|
|
25
23
|
this.timeline = timeline;
|
|
26
|
-
this.id = ""
|
|
24
|
+
this.id = "" + sequenceNumber++;
|
|
27
25
|
this._inEffect = !!this.effect.update(0);
|
|
28
26
|
this._holdTime = 0;
|
|
29
27
|
this._paused = false;
|
|
@@ -3,9 +3,7 @@ import { linear, parseEasingFunction } from '../utils/animation';
|
|
|
3
3
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
var AnimationEffectTiming =
|
|
7
|
-
/** @class */
|
|
8
|
-
function () {
|
|
6
|
+
var AnimationEffectTiming = function () {
|
|
9
7
|
function AnimationEffectTiming() {
|
|
10
8
|
/**
|
|
11
9
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/delay
|
package/es/dom/AnimationEvent.js
CHANGED
|
@@ -4,9 +4,7 @@ import { FederatedEvent } from './FederatedEvent';
|
|
|
4
4
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
var AnimationEvent =
|
|
8
|
-
/** @class */
|
|
9
|
-
function (_super) {
|
|
7
|
+
var AnimationEvent = function (_super) {
|
|
10
8
|
__extends(AnimationEvent, _super);
|
|
11
9
|
|
|
12
10
|
function AnimationEvent(manager, target, currentTime, timelineTime) {
|
|
@@ -7,9 +7,7 @@ export function compareAnimations(leftAnimation, rightAnimation) {
|
|
|
7
7
|
* @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/web-animations-js/index.d.ts
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var AnimationTimeline =
|
|
11
|
-
/** @class */
|
|
12
|
-
function () {
|
|
10
|
+
var AnimationTimeline = function () {
|
|
13
11
|
function AnimationTimeline(document) {
|
|
14
12
|
var _this = this;
|
|
15
13
|
|
|
@@ -6,9 +6,7 @@ import { Ellipse, Circle, Rect, Image, Line, Path, Group, Polygon, Polyline, Tex
|
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CustomElementRegistry =
|
|
10
|
-
/** @class */
|
|
11
|
-
function () {
|
|
9
|
+
var CustomElementRegistry = function () {
|
|
12
10
|
function CustomElementRegistry() {
|
|
13
11
|
this.registry = {};
|
|
14
12
|
this.define(Shape.CIRCLE, Circle);
|
package/es/dom/CustomEvent.js
CHANGED
|
@@ -13,9 +13,7 @@ import { FederatedEvent } from './FederatedEvent';
|
|
|
13
13
|
circle.dispatchEvent(event);
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
var CustomEvent =
|
|
17
|
-
/** @class */
|
|
18
|
-
function (_super) {
|
|
16
|
+
var CustomEvent = function (_super) {
|
|
19
17
|
__extends(CustomEvent, _super); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
20
18
|
|
|
21
19
|
|
package/es/dom/Document.js
CHANGED
|
@@ -9,9 +9,7 @@ import { BUILT_IN_PROPERTIES } from '../css';
|
|
|
9
9
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
var Document =
|
|
13
|
-
/** @class */
|
|
14
|
-
function (_super) {
|
|
12
|
+
var Document = function (_super) {
|
|
15
13
|
__extends(Document, _super);
|
|
16
14
|
|
|
17
15
|
function Document() {
|