@antv/g 5.0.22-alpha.5 → 5.0.23-alpha.0
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.min.js +30 -0
- package/es/AbstractRenderer.js +8 -1
- package/es/Canvas.d.ts +1 -1
- package/es/Canvas.js +5 -3
- package/es/DisplayObjectPool.js +3 -1
- package/es/camera/Camera.d.ts +105 -66
- package/es/camera/Camera.js +306 -170
- package/es/camera/Landmark.d.ts +18 -25
- package/es/camera/Landmark.js +1 -72
- package/es/canvas-module.js +2 -4
- package/es/components/Cullable.js +3 -1
- package/es/components/Geometry.js +3 -1
- package/es/components/Renderable.js +3 -1
- package/es/components/Sortable.js +3 -1
- package/es/components/Transform.js +3 -1
- package/es/css/LayoutRegistry.js +3 -1
- package/es/css/StyleValueRegistry.d.ts +8 -0
- package/es/css/StyleValueRegistry.js +24 -19
- package/es/css/cssom/CSSColorValue.js +3 -1
- package/es/css/cssom/CSSGradientValue.js +8 -6
- package/es/css/cssom/CSSKeywordValue.js +3 -1
- package/es/css/cssom/CSSMathInvert.js +3 -1
- package/es/css/cssom/CSSMathMax.js +3 -1
- package/es/css/cssom/CSSMathMin.js +3 -1
- package/es/css/cssom/CSSMathNegate.js +3 -1
- package/es/css/cssom/CSSMathProduct.js +3 -1
- package/es/css/cssom/CSSMathSum.js +3 -1
- package/es/css/cssom/CSSMathValue.js +3 -1
- package/es/css/cssom/CSSMathVariadic.js +3 -1
- package/es/css/cssom/CSSNumericValue.js +3 -1
- package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/es/css/cssom/CSSNumericValueType.js +3 -1
- package/es/css/cssom/CSSRGB.js +4 -2
- package/es/css/cssom/CSSStyleValue.d.ts +1 -1
- package/es/css/cssom/CSSStyleValue.js +3 -1
- package/es/css/cssom/CSSTransformComponent.js +3 -1
- package/es/css/cssom/CSSTransformValue.js +3 -1
- package/es/css/cssom/CSSTranslate.js +3 -1
- package/es/css/cssom/CSSUnitValue.js +4 -2
- package/es/css/parser/color.js +2 -2
- package/es/css/parser/dimension.d.ts +1 -1
- package/es/css/parser/dimension.js +2 -3
- package/es/css/parser/numeric.js +1 -1
- package/es/css/parser/path.d.ts +2 -2
- package/es/css/parser/path.js +1 -1
- package/es/css/parser/points.js +1 -1
- package/es/css/parser/transform-origin.js +1 -1
- package/es/css/properties/CSSPropertyAnchor.js +3 -1
- package/es/css/properties/CSSPropertyClipPath.js +3 -1
- package/es/css/properties/CSSPropertyColor.js +3 -1
- package/es/css/properties/CSSPropertyFilter.js +3 -1
- package/es/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
- package/es/css/properties/CSSPropertyLineDash.js +3 -1
- package/es/css/properties/CSSPropertyLocalPosition.js +3 -1
- package/es/css/properties/CSSPropertyOffsetDistance.js +3 -1
- package/es/css/properties/CSSPropertyOffsetPath.js +3 -1
- package/es/css/properties/CSSPropertyOpacity.js +3 -1
- package/es/css/properties/CSSPropertyPath.d.ts +14 -2
- package/es/css/properties/CSSPropertyPath.js +3 -1
- package/es/css/properties/CSSPropertyPoints.js +3 -1
- package/es/css/properties/CSSPropertyShadowBlur.js +3 -1
- package/es/css/properties/CSSPropertyText.d.ts +1 -1
- package/es/css/properties/CSSPropertyText.js +4 -2
- package/es/css/properties/CSSPropertyTextTransform.d.ts +3 -3
- package/es/css/properties/CSSPropertyTextTransform.js +3 -1
- package/es/css/properties/CSSPropertyTransform.js +4 -3
- package/es/css/properties/CSSPropertyTransformOrigin.js +3 -1
- package/es/css/properties/CSSPropertyVisibility.js +3 -1
- package/es/css/properties/CSSPropertyZIndex.js +3 -1
- package/es/display-objects/Circle.js +3 -1
- package/es/display-objects/CustomElement.js +3 -1
- package/es/display-objects/DisplayObject.js +10 -8
- package/es/display-objects/Ellipse.js +3 -1
- package/es/display-objects/Group.js +3 -1
- package/es/display-objects/HTML.js +6 -3
- package/es/display-objects/Image.js +3 -1
- package/es/display-objects/Line.js +3 -1
- package/es/display-objects/Path.d.ts +15 -15
- package/es/display-objects/Path.js +5 -3
- package/es/display-objects/Polygon.d.ts +8 -1
- package/es/display-objects/Polygon.js +3 -1
- package/es/display-objects/Polyline.d.ts +7 -5
- package/es/display-objects/Polyline.js +3 -1
- package/es/display-objects/Rect.js +3 -1
- package/es/display-objects/Text.js +6 -3
- package/es/dom/Animation.js +4 -2
- package/es/dom/AnimationEffectTiming.js +3 -1
- package/es/dom/AnimationEvent.js +3 -1
- package/es/dom/AnimationTimeline.js +3 -1
- package/es/dom/CustomElementRegistry.js +3 -1
- package/es/dom/CustomEvent.js +3 -1
- package/es/dom/Document.js +5 -3
- package/es/dom/Element.js +7 -6
- package/es/dom/EventTarget.js +6 -4
- package/es/dom/FederatedEvent.js +3 -1
- package/es/dom/FederatedMouseEvent.js +3 -1
- package/es/dom/FederatedPointerEvent.js +3 -1
- package/es/dom/FederatedTouchEvent.d.ts +15 -0
- package/es/dom/FederatedTouchEvent.js +19 -0
- package/es/dom/FederatedWheelEvent.js +3 -1
- package/es/dom/KeyframeEffect.js +3 -1
- package/es/dom/KeyframeList.js +1 -1
- package/es/dom/MutationEvent.js +3 -1
- package/es/dom/MutationObserver.js +10 -3
- package/es/dom/MutationRecord.js +3 -1
- package/es/dom/Node.js +4 -2
- package/es/plugins/CullingPlugin.d.ts +0 -1
- package/es/plugins/CullingPlugin.js +6 -9
- package/es/plugins/DirtyCheckPlugin.d.ts +1 -1
- package/es/plugins/DirtyCheckPlugin.js +12 -9
- package/es/plugins/EventPlugin.d.ts +1 -1
- package/es/plugins/EventPlugin.js +166 -149
- package/es/plugins/FrustumCullingStrategy.js +3 -1
- package/es/plugins/PrepareRendererPlugin.d.ts +0 -1
- package/es/plugins/PrepareRendererPlugin.js +18 -17
- package/es/services/EventService.d.ts +8 -0
- package/es/services/EventService.js +279 -23
- package/es/services/OffscreenCanvasCreator.js +3 -1
- package/es/services/RenderingService.d.ts +17 -16
- package/es/services/RenderingService.js +21 -18
- package/es/services/SceneGraphSelector.js +3 -1
- package/es/services/SceneGraphService.js +4 -2
- package/es/services/TextService.js +5 -3
- package/es/services/aabb/CircleUpdater.js +3 -1
- package/es/services/aabb/EllipseUpdater.js +3 -1
- package/es/services/aabb/LineUpdater.js +3 -1
- package/es/services/aabb/PathUpdater.d.ts +3 -3
- package/es/services/aabb/PathUpdater.js +3 -1
- package/es/services/aabb/PolylineUpdater.d.ts +3 -3
- package/es/services/aabb/PolylineUpdater.js +3 -1
- package/es/services/aabb/RectUpdater.js +4 -2
- package/es/services/aabb/TextUpdater.js +3 -1
- package/es/shapes/AABB.js +3 -1
- package/es/shapes/BoundingSphere.js +3 -1
- package/es/shapes/Frustum.js +3 -1
- package/es/shapes/Plane.js +3 -1
- package/es/shapes/Point.js +3 -1
- package/es/shapes/Ray.js +3 -1
- package/es/shapes/Rectangle.js +3 -1
- package/es/types.d.ts +9 -3
- package/es/utils/assert.d.ts +6 -0
- package/es/utils/assert.js +18 -0
- package/es/utils/custom-easing.js +1 -1
- package/es/utils/event.d.ts +18 -16
- package/es/utils/hooks.d.ts +280 -0
- package/es/utils/hooks.js +753 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +2 -1
- package/es/utils/math.d.ts +2 -2
- package/es/utils/math.js +22 -6
- package/es/utils/path.d.ts +1 -1
- package/es/utils/path.js +3 -3
- package/es/utils/string.d.ts +1 -0
- package/es/utils/string.js +8 -0
- package/es/utils/text.js +5 -4
- package/lib/AbstractRenderer.js +8 -1
- package/lib/Canvas.d.ts +1 -1
- package/lib/Canvas.js +5 -3
- package/lib/DisplayObjectPool.js +3 -1
- package/lib/camera/Camera.d.ts +105 -66
- package/lib/camera/Camera.js +313 -178
- package/lib/camera/Landmark.d.ts +18 -25
- package/lib/camera/Landmark.js +1 -75
- package/lib/canvas-module.js +1 -3
- package/lib/components/Cullable.js +4 -2
- package/lib/components/Geometry.js +3 -1
- package/lib/components/Renderable.js +3 -1
- package/lib/components/Sortable.js +3 -1
- package/lib/components/Transform.js +3 -1
- package/lib/css/LayoutRegistry.js +3 -1
- package/lib/css/StyleValueRegistry.d.ts +8 -0
- package/lib/css/StyleValueRegistry.js +27 -20
- package/lib/css/cssom/CSSColorValue.js +3 -1
- package/lib/css/cssom/CSSGradientValue.js +9 -7
- package/lib/css/cssom/CSSKeywordValue.js +3 -1
- package/lib/css/cssom/CSSMathInvert.js +3 -1
- package/lib/css/cssom/CSSMathMax.js +3 -1
- package/lib/css/cssom/CSSMathMin.js +3 -1
- package/lib/css/cssom/CSSMathNegate.js +3 -1
- package/lib/css/cssom/CSSMathOperator.js +1 -1
- package/lib/css/cssom/CSSMathProduct.js +3 -1
- package/lib/css/cssom/CSSMathSum.js +3 -1
- package/lib/css/cssom/CSSMathValue.js +3 -1
- package/lib/css/cssom/CSSMathVariadic.js +4 -2
- package/lib/css/cssom/CSSNumericValue.js +3 -1
- package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/lib/css/cssom/CSSNumericValueType.js +5 -3
- package/lib/css/cssom/CSSRGB.js +4 -2
- package/lib/css/cssom/CSSStyleValue.d.ts +1 -1
- package/lib/css/cssom/CSSStyleValue.js +4 -2
- package/lib/css/cssom/CSSTransformComponent.js +4 -2
- package/lib/css/cssom/CSSTransformValue.js +3 -1
- package/lib/css/cssom/CSSTranslate.js +3 -1
- package/lib/css/cssom/CSSUnitValue.js +4 -2
- package/lib/css/cssom/types.js +1 -1
- package/lib/css/parser/color.js +8 -8
- package/lib/css/parser/dimension.d.ts +1 -1
- package/lib/css/parser/dimension.js +8 -9
- package/lib/css/parser/numeric.js +6 -6
- package/lib/css/parser/path.d.ts +2 -2
- package/lib/css/parser/path.js +5 -5
- package/lib/css/parser/points.js +2 -2
- package/lib/css/parser/transform-origin.js +2 -2
- package/lib/css/parser/transform.js +2 -2
- package/lib/css/properties/CSSPropertyAnchor.js +3 -1
- package/lib/css/properties/CSSPropertyClipPath.js +3 -1
- package/lib/css/properties/CSSPropertyColor.js +3 -1
- package/lib/css/properties/CSSPropertyFilter.js +3 -1
- package/lib/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
- package/lib/css/properties/CSSPropertyLineDash.js +3 -1
- package/lib/css/properties/CSSPropertyLocalPosition.js +3 -1
- package/lib/css/properties/CSSPropertyOffsetDistance.js +3 -1
- package/lib/css/properties/CSSPropertyOffsetPath.js +3 -1
- package/lib/css/properties/CSSPropertyOpacity.js +3 -1
- package/lib/css/properties/CSSPropertyPath.d.ts +14 -2
- package/lib/css/properties/CSSPropertyPath.js +3 -1
- package/lib/css/properties/CSSPropertyPoints.js +3 -1
- package/lib/css/properties/CSSPropertyShadowBlur.js +3 -1
- package/lib/css/properties/CSSPropertyText.d.ts +1 -1
- package/lib/css/properties/CSSPropertyText.js +4 -2
- package/lib/css/properties/CSSPropertyTextTransform.d.ts +3 -3
- package/lib/css/properties/CSSPropertyTextTransform.js +3 -1
- package/lib/css/properties/CSSPropertyTransform.js +3 -3
- package/lib/css/properties/CSSPropertyTransformOrigin.js +3 -1
- package/lib/css/properties/CSSPropertyVisibility.js +3 -1
- package/lib/css/properties/CSSPropertyZIndex.js +3 -1
- package/lib/display-objects/Circle.js +3 -1
- package/lib/display-objects/CustomElement.js +3 -1
- package/lib/display-objects/DisplayObject.js +13 -12
- package/lib/display-objects/Ellipse.js +3 -1
- package/lib/display-objects/Group.js +3 -1
- package/lib/display-objects/HTML.js +6 -4
- package/lib/display-objects/Image.js +3 -1
- package/lib/display-objects/Line.js +3 -1
- package/lib/display-objects/Path.d.ts +15 -15
- package/lib/display-objects/Path.js +7 -5
- package/lib/display-objects/Polygon.d.ts +8 -1
- package/lib/display-objects/Polygon.js +3 -1
- package/lib/display-objects/Polyline.d.ts +7 -5
- package/lib/display-objects/Polyline.js +3 -1
- package/lib/display-objects/Rect.js +3 -1
- package/lib/display-objects/Text.js +6 -4
- package/lib/dom/Animation.js +4 -2
- package/lib/dom/AnimationEffectTiming.js +3 -1
- package/lib/dom/AnimationEvent.js +3 -1
- package/lib/dom/AnimationTimeline.js +4 -2
- package/lib/dom/CustomElementRegistry.js +3 -1
- package/lib/dom/CustomEvent.js +3 -1
- package/lib/dom/Document.js +5 -3
- package/lib/dom/Element.js +7 -7
- package/lib/dom/EventTarget.js +14 -12
- package/lib/dom/FederatedEvent.js +3 -1
- package/lib/dom/FederatedMouseEvent.js +3 -1
- package/lib/dom/FederatedPointerEvent.js +3 -1
- package/lib/dom/FederatedTouchEvent.d.ts +15 -0
- package/lib/dom/FederatedTouchEvent.js +27 -0
- package/lib/dom/FederatedWheelEvent.js +3 -1
- package/lib/dom/KeyframeEffect.js +4 -2
- package/lib/dom/KeyframeList.js +1 -1
- package/lib/dom/MutationEvent.js +3 -1
- package/lib/dom/MutationObserver.js +11 -4
- package/lib/dom/MutationRecord.js +3 -1
- package/lib/dom/Node.js +4 -2
- package/lib/index.js +1 -1
- package/lib/plugins/CullingPlugin.d.ts +0 -1
- package/lib/plugins/CullingPlugin.js +7 -9
- package/lib/plugins/DirtyCheckPlugin.d.ts +1 -1
- package/lib/plugins/DirtyCheckPlugin.js +13 -9
- package/lib/plugins/EventPlugin.d.ts +1 -1
- package/lib/plugins/EventPlugin.js +175 -157
- package/lib/plugins/FrustumCullingStrategy.js +3 -1
- package/lib/plugins/PrepareRendererPlugin.d.ts +0 -1
- package/lib/plugins/PrepareRendererPlugin.js +17 -15
- package/lib/services/EventService.d.ts +8 -0
- package/lib/services/EventService.js +279 -22
- package/lib/services/OffscreenCanvasCreator.js +3 -1
- package/lib/services/RenderingService.d.ts +17 -16
- package/lib/services/RenderingService.js +22 -19
- package/lib/services/SceneGraphSelector.js +4 -2
- package/lib/services/SceneGraphService.js +8 -6
- package/lib/services/TextService.js +5 -3
- package/lib/services/aabb/CircleUpdater.js +3 -1
- package/lib/services/aabb/EllipseUpdater.js +3 -1
- package/lib/services/aabb/LineUpdater.js +3 -1
- package/lib/services/aabb/PathUpdater.d.ts +3 -3
- package/lib/services/aabb/PathUpdater.js +3 -1
- package/lib/services/aabb/PolylineUpdater.d.ts +3 -3
- package/lib/services/aabb/PolylineUpdater.js +3 -1
- package/lib/services/aabb/RectUpdater.js +6 -4
- package/lib/services/aabb/TextUpdater.js +3 -1
- package/lib/services/aabb/index.js +10 -10
- package/lib/services/aabb/interfaces.js +1 -1
- package/lib/shapes/AABB.js +3 -1
- package/lib/shapes/BoundingSphere.js +3 -1
- package/lib/shapes/Frustum.js +4 -2
- package/lib/shapes/Plane.js +3 -1
- package/lib/shapes/Point.js +3 -1
- package/lib/shapes/Ray.js +3 -1
- package/lib/shapes/Rectangle.js +3 -1
- package/lib/types.d.ts +9 -3
- package/lib/types.js +1 -1
- package/lib/utils/animation.js +3 -2
- package/lib/utils/assert.d.ts +6 -0
- package/lib/utils/assert.js +30 -0
- package/lib/utils/bezier-easing.js +1 -1
- package/lib/utils/custom-easing.js +2 -2
- package/lib/utils/event.d.ts +18 -16
- package/lib/utils/hooks.d.ts +280 -0
- package/lib/utils/hooks.js +759 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +13 -0
- package/lib/utils/math.d.ts +2 -2
- package/lib/utils/math.js +34 -18
- package/lib/utils/path.d.ts +1 -1
- package/lib/utils/path.js +6 -6
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/string.js +11 -0
- package/lib/utils/text.js +7 -5
- package/package.json +5 -6
|
@@ -9,8 +9,6 @@ var _tslib = require("tslib");
|
|
|
9
9
|
|
|
10
10
|
var _manaSyringe = require("mana-syringe");
|
|
11
11
|
|
|
12
|
-
var _util = require("@antv/util");
|
|
13
|
-
|
|
14
12
|
var _glMatrix = require("gl-matrix");
|
|
15
13
|
|
|
16
14
|
var _DisplayObjectPool = require("../DisplayObjectPool");
|
|
@@ -78,14 +76,17 @@ var DEFAULT_STYLE_PROPS = {
|
|
|
78
76
|
* * attributeChanged
|
|
79
77
|
*/
|
|
80
78
|
|
|
81
|
-
var DisplayObject =
|
|
79
|
+
var DisplayObject =
|
|
80
|
+
/** @class */
|
|
81
|
+
function (_super) {
|
|
82
82
|
(0, _tslib.__extends)(DisplayObject, _super);
|
|
83
83
|
|
|
84
84
|
function DisplayObject(config) {
|
|
85
|
-
var
|
|
85
|
+
var _this = this;
|
|
86
86
|
|
|
87
|
-
var
|
|
87
|
+
var _a, _b, _c;
|
|
88
88
|
|
|
89
|
+
_this = _super.call(this) || this;
|
|
89
90
|
_this.styleValueRegistry = _manaSyringe.GlobalContainer.get(_StyleValueRegistry.StyleValueRegistry);
|
|
90
91
|
/**
|
|
91
92
|
* push to active animations after calling `animate()`
|
|
@@ -112,11 +113,11 @@ var DisplayObject = function (_super) {
|
|
|
112
113
|
interactive: (_c = _this.config.interactive) !== null && _c !== void 0 ? _c : true
|
|
113
114
|
}), _this.config.style), _this.config.attrs);
|
|
114
115
|
|
|
115
|
-
if (
|
|
116
|
+
if (_this.config.visible != null) {
|
|
116
117
|
_this.config.style.visibility = _this.config.visible === false ? 'hidden' : 'visible';
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
if (
|
|
120
|
+
if (_this.config.interactive != null) {
|
|
120
121
|
_this.config.style.pointerEvents = _this.config.interactive === false ? 'none' : 'auto';
|
|
121
122
|
}
|
|
122
123
|
|
|
@@ -210,11 +211,11 @@ var DisplayObject = function (_super) {
|
|
|
210
211
|
attributeValue = _a[1]; // ignore undefined value
|
|
211
212
|
|
|
212
213
|
|
|
213
|
-
if ((0,
|
|
214
|
+
if ((0, _utils.isUndefined)(value)) {
|
|
214
215
|
return;
|
|
215
216
|
}
|
|
216
217
|
|
|
217
|
-
if (force ||
|
|
218
|
+
if (force || attributeValue != this.attributes[attributeName]) {
|
|
218
219
|
this.internalSetAttribute(attributeName, attributeValue);
|
|
219
220
|
|
|
220
221
|
_super.prototype.setAttribute.call(this, attributeName, attributeValue);
|
|
@@ -473,7 +474,7 @@ var DisplayObject = function (_super) {
|
|
|
473
474
|
};
|
|
474
475
|
|
|
475
476
|
DisplayObject.prototype.rotateLocal = function (x, y, z) {
|
|
476
|
-
if ((0,
|
|
477
|
+
if ((0, _utils.isNil)(y) && (0, _utils.isNil)(z)) {
|
|
477
478
|
this.sceneGraphService.rotateLocal(this, 0, 0, x);
|
|
478
479
|
} else {
|
|
479
480
|
this.sceneGraphService.rotateLocal(this, x, y, z);
|
|
@@ -483,7 +484,7 @@ var DisplayObject = function (_super) {
|
|
|
483
484
|
};
|
|
484
485
|
|
|
485
486
|
DisplayObject.prototype.rotate = function (x, y, z) {
|
|
486
|
-
if ((0,
|
|
487
|
+
if ((0, _utils.isNil)(y) && (0, _utils.isNil)(z)) {
|
|
487
488
|
this.sceneGraphService.rotate(this, 0, 0, x);
|
|
488
489
|
} else {
|
|
489
490
|
this.sceneGraphService.rotate(this, x, y, z);
|
|
@@ -793,7 +794,7 @@ var DisplayObject = function (_super) {
|
|
|
793
794
|
return this.attributes;
|
|
794
795
|
}
|
|
795
796
|
|
|
796
|
-
if ((0,
|
|
797
|
+
if ((0, _utils.isObject)(name)) {
|
|
797
798
|
Object.keys(name).forEach(function (key) {
|
|
798
799
|
_this.setAttribute(key, name[key]);
|
|
799
800
|
});
|
|
@@ -11,7 +11,9 @@ var _types = require("../types");
|
|
|
11
11
|
|
|
12
12
|
var _DisplayObject = require("./DisplayObject");
|
|
13
13
|
|
|
14
|
-
var Ellipse =
|
|
14
|
+
var Ellipse =
|
|
15
|
+
/** @class */
|
|
16
|
+
function (_super) {
|
|
15
17
|
(0, _tslib.__extends)(Ellipse, _super);
|
|
16
18
|
|
|
17
19
|
function Ellipse(_a) {
|
|
@@ -21,7 +21,9 @@ var _DisplayObject = require("./DisplayObject");
|
|
|
21
21
|
<circle cx="60" cy="60" r="25" />
|
|
22
22
|
</g>
|
|
23
23
|
*/
|
|
24
|
-
var Group =
|
|
24
|
+
var Group =
|
|
25
|
+
/** @class */
|
|
26
|
+
function (_super) {
|
|
25
27
|
(0, _tslib.__extends)(Group, _super);
|
|
26
28
|
|
|
27
29
|
function Group(_a) {
|
|
@@ -19,7 +19,9 @@ var _glMatrix = require("gl-matrix");
|
|
|
19
19
|
* HTML container
|
|
20
20
|
* @see https://github.com/pmndrs/drei#html
|
|
21
21
|
*/
|
|
22
|
-
var HTML =
|
|
22
|
+
var HTML =
|
|
23
|
+
/** @class */
|
|
24
|
+
function (_super) {
|
|
23
25
|
(0, _tslib.__extends)(HTML, _super);
|
|
24
26
|
|
|
25
27
|
function HTML(_a) {
|
|
@@ -27,10 +29,11 @@ var HTML = function (_super) {
|
|
|
27
29
|
_a = {};
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
var _this = this;
|
|
33
|
+
|
|
30
34
|
var style = _a.style,
|
|
31
35
|
rest = (0, _tslib.__rest)(_a, ["style"]);
|
|
32
|
-
|
|
33
|
-
var _this = _super.call(this, (0, _tslib.__assign)({
|
|
36
|
+
_this = _super.call(this, (0, _tslib.__assign)({
|
|
34
37
|
type: _types.Shape.HTML,
|
|
35
38
|
style: (0, _tslib.__assign)({
|
|
36
39
|
innerHTML: '',
|
|
@@ -38,7 +41,6 @@ var HTML = function (_super) {
|
|
|
38
41
|
style: ''
|
|
39
42
|
}, style)
|
|
40
43
|
}, rest)) || this;
|
|
41
|
-
|
|
42
44
|
_this.cullable.enable = false;
|
|
43
45
|
return _this;
|
|
44
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseStyleProps, PathCommand } from '../types';
|
|
1
|
+
import type { BaseStyleProps, PathCommand, ParsedBaseStyleProps } from '../types';
|
|
2
2
|
import { DisplayObject } from './DisplayObject';
|
|
3
3
|
import type { DisplayObjectConfig } from '../dom';
|
|
4
4
|
import { Point } from '../shapes';
|
|
@@ -16,21 +16,21 @@ export interface PathSegment {
|
|
|
16
16
|
endTangent: [number, number] | null;
|
|
17
17
|
params: PathCommand;
|
|
18
18
|
}
|
|
19
|
-
export interface ParsedPathStyleProps {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
export interface ParsedPathStyleProps extends ParsedBaseStyleProps {
|
|
20
|
+
path: {
|
|
21
|
+
absolutePath: PathCommand[];
|
|
22
|
+
hasArc: boolean;
|
|
23
|
+
segments: PathSegment[];
|
|
24
|
+
polygons: [number, number][][];
|
|
25
|
+
polylines: [number, number][][];
|
|
26
|
+
curve: PathCommand[];
|
|
27
|
+
totalLength: number;
|
|
28
|
+
curveSegments: number[][];
|
|
29
|
+
zCommandIndexes: number[];
|
|
30
|
+
rect: Rectangle;
|
|
31
|
+
};
|
|
30
32
|
}
|
|
31
|
-
export declare class Path extends DisplayObject<PathStyleProps, {
|
|
32
|
-
path: ParsedPathStyleProps;
|
|
33
|
-
}> {
|
|
33
|
+
export declare class Path extends DisplayObject<PathStyleProps, ParsedPathStyleProps> {
|
|
34
34
|
constructor({ style, ...rest }?: DisplayObjectConfig<PathStyleProps>);
|
|
35
35
|
getTotalLength(): number;
|
|
36
36
|
/**
|
|
@@ -7,17 +7,19 @@ exports.Path = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
10
|
+
var _gMath = require("@antv/g-math");
|
|
11
|
+
|
|
10
12
|
var _types = require("../types");
|
|
11
13
|
|
|
12
14
|
var _DisplayObject = require("./DisplayObject");
|
|
13
15
|
|
|
14
16
|
var _shapes = require("../shapes");
|
|
15
17
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _util = require("@antv/util");
|
|
18
|
+
var _utils = require("../utils");
|
|
19
19
|
|
|
20
|
-
var Path =
|
|
20
|
+
var Path =
|
|
21
|
+
/** @class */
|
|
22
|
+
function (_super) {
|
|
21
23
|
(0, _tslib.__extends)(Path, _super);
|
|
22
24
|
|
|
23
25
|
function Path(_a) {
|
|
@@ -66,7 +68,7 @@ var Path = function (_super) {
|
|
|
66
68
|
});
|
|
67
69
|
var seg = curve[index];
|
|
68
70
|
|
|
69
|
-
if ((0,
|
|
71
|
+
if ((0, _utils.isNil)(seg) || (0, _utils.isNil)(index)) {
|
|
70
72
|
return null;
|
|
71
73
|
}
|
|
72
74
|
|
|
@@ -4,6 +4,13 @@ import type { DisplayObjectConfig } from '../dom';
|
|
|
4
4
|
export interface PolygonStyleProps extends BaseStyleProps {
|
|
5
5
|
points: [number, number][];
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export interface ParsedPolygonStyleProps extends ParsedBaseStyleProps {
|
|
8
|
+
points: {
|
|
9
|
+
points: [number, number][];
|
|
10
|
+
segments: [number, number][];
|
|
11
|
+
totalLength: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare class Polygon extends DisplayObject<PolygonStyleProps, ParsedPolygonStyleProps> {
|
|
8
15
|
constructor({ style, ...rest }?: DisplayObjectConfig<PolygonStyleProps>);
|
|
9
16
|
}
|
|
@@ -11,7 +11,9 @@ var _types = require("../types");
|
|
|
11
11
|
|
|
12
12
|
var _DisplayObject = require("./DisplayObject");
|
|
13
13
|
|
|
14
|
-
var Polygon =
|
|
14
|
+
var Polygon =
|
|
15
|
+
/** @class */
|
|
16
|
+
function (_super) {
|
|
15
17
|
(0, _tslib.__extends)(Polygon, _super);
|
|
16
18
|
|
|
17
19
|
function Polygon(_a) {
|
|
@@ -5,12 +5,14 @@ import { Point } from '../shapes';
|
|
|
5
5
|
export interface PolylineStyleProps extends BaseStyleProps {
|
|
6
6
|
points: [number, number][];
|
|
7
7
|
}
|
|
8
|
-
export interface ParsedPolylineStyleProps {
|
|
9
|
-
points:
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export interface ParsedPolylineStyleProps extends ParsedBaseStyleProps {
|
|
9
|
+
points: {
|
|
10
|
+
points: [number, number][];
|
|
11
|
+
segments: [number, number][];
|
|
12
|
+
totalLength: number;
|
|
13
|
+
};
|
|
12
14
|
}
|
|
13
|
-
export declare class Polyline extends DisplayObject<PolylineStyleProps,
|
|
15
|
+
export declare class Polyline extends DisplayObject<PolylineStyleProps, ParsedPolylineStyleProps> {
|
|
14
16
|
constructor({ style, ...rest }?: DisplayObjectConfig<PolylineStyleProps>);
|
|
15
17
|
getTotalLength(): number;
|
|
16
18
|
getPoint(ratio: number): Point;
|
|
@@ -15,7 +15,9 @@ var _DisplayObject = require("./DisplayObject");
|
|
|
15
15
|
|
|
16
16
|
var _shapes = require("../shapes");
|
|
17
17
|
|
|
18
|
-
var Polyline =
|
|
18
|
+
var Polyline =
|
|
19
|
+
/** @class */
|
|
20
|
+
function (_super) {
|
|
19
21
|
(0, _tslib.__extends)(Polyline, _super);
|
|
20
22
|
|
|
21
23
|
function Polyline(_a) {
|
|
@@ -14,7 +14,9 @@ var _DisplayObject = require("./DisplayObject");
|
|
|
14
14
|
/**
|
|
15
15
|
* <text> @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement
|
|
16
16
|
*/
|
|
17
|
-
var Text =
|
|
17
|
+
var Text =
|
|
18
|
+
/** @class */
|
|
19
|
+
function (_super) {
|
|
18
20
|
(0, _tslib.__extends)(Text, _super);
|
|
19
21
|
|
|
20
22
|
function Text(_a) {
|
|
@@ -22,10 +24,11 @@ var Text = function (_super) {
|
|
|
22
24
|
_a = {};
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
var _this = this;
|
|
28
|
+
|
|
25
29
|
var style = _a.style,
|
|
26
30
|
rest = (0, _tslib.__rest)(_a, ["style"]);
|
|
27
|
-
|
|
28
|
-
var _this = _super.call(this, (0, _tslib.__assign)({
|
|
31
|
+
_this = _super.call(this, (0, _tslib.__assign)({
|
|
29
32
|
type: _types.Shape.TEXT,
|
|
30
33
|
style: (0, _tslib.__assign)({
|
|
31
34
|
text: '',
|
|
@@ -61,7 +64,6 @@ var Text = function (_super) {
|
|
|
61
64
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
|
|
62
65
|
*/
|
|
63
66
|
|
|
64
|
-
|
|
65
67
|
_this.LENGTHADJUST_SPACING = 1;
|
|
66
68
|
_this.LENGTHADJUST_SPACINGANDGLYPHS = 2;
|
|
67
69
|
_this.LENGTHADJUST_UNKNOWN = 0;
|
package/lib/dom/Animation.js
CHANGED
|
@@ -12,7 +12,9 @@ var sequenceNumber = 0;
|
|
|
12
12
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
var Animation =
|
|
15
|
+
var Animation =
|
|
16
|
+
/** @class */
|
|
17
|
+
function () {
|
|
16
18
|
function Animation(effect, timeline) {
|
|
17
19
|
this.currentTimePending = false;
|
|
18
20
|
/**
|
|
@@ -29,7 +31,7 @@ var Animation = function () {
|
|
|
29
31
|
this.effect = effect;
|
|
30
32
|
effect.animation = this;
|
|
31
33
|
this.timeline = timeline;
|
|
32
|
-
this.id = ""
|
|
34
|
+
this.id = "".concat(sequenceNumber++);
|
|
33
35
|
this._inEffect = !!this.effect.update(0);
|
|
34
36
|
this._holdTime = 0;
|
|
35
37
|
this._paused = false;
|
|
@@ -10,7 +10,9 @@ var _animation = require("../utils/animation");
|
|
|
10
10
|
/**
|
|
11
11
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming
|
|
12
12
|
*/
|
|
13
|
-
var AnimationEffectTiming =
|
|
13
|
+
var AnimationEffectTiming =
|
|
14
|
+
/** @class */
|
|
15
|
+
function () {
|
|
14
16
|
function AnimationEffectTiming() {
|
|
15
17
|
/**
|
|
16
18
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/delay
|
|
@@ -12,7 +12,9 @@ var _FederatedEvent = require("./FederatedEvent");
|
|
|
12
12
|
/**
|
|
13
13
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent
|
|
14
14
|
*/
|
|
15
|
-
var AnimationEvent =
|
|
15
|
+
var AnimationEvent =
|
|
16
|
+
/** @class */
|
|
17
|
+
function (_super) {
|
|
16
18
|
(0, _tslib.__extends)(AnimationEvent, _super);
|
|
17
19
|
|
|
18
20
|
function AnimationEvent(manager, target, currentTime, timelineTime) {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.compareAnimations = compareAnimations;
|
|
7
6
|
exports.AnimationTimeline = void 0;
|
|
7
|
+
exports.compareAnimations = compareAnimations;
|
|
8
8
|
|
|
9
9
|
var _tslib = require("tslib");
|
|
10
10
|
|
|
@@ -18,7 +18,9 @@ function compareAnimations(leftAnimation, rightAnimation) {
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var AnimationTimeline =
|
|
21
|
+
var AnimationTimeline =
|
|
22
|
+
/** @class */
|
|
23
|
+
function () {
|
|
22
24
|
function AnimationTimeline(document) {
|
|
23
25
|
var _this = this;
|
|
24
26
|
|
|
@@ -14,7 +14,9 @@ var _displayObjects = require("../display-objects");
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
|
|
16
16
|
*/
|
|
17
|
-
var CustomElementRegistry =
|
|
17
|
+
var CustomElementRegistry =
|
|
18
|
+
/** @class */
|
|
19
|
+
function () {
|
|
18
20
|
function CustomElementRegistry() {
|
|
19
21
|
this.registry = {};
|
|
20
22
|
this.define(_types.Shape.CIRCLE, _displayObjects.Circle);
|
package/lib/dom/CustomEvent.js
CHANGED
|
@@ -21,7 +21,9 @@ var _FederatedEvent = require("./FederatedEvent");
|
|
|
21
21
|
|
|
22
22
|
circle.dispatchEvent(event);
|
|
23
23
|
*/
|
|
24
|
-
var CustomEvent =
|
|
24
|
+
var CustomEvent =
|
|
25
|
+
/** @class */
|
|
26
|
+
function (_super) {
|
|
25
27
|
(0, _tslib.__extends)(CustomEvent, _super); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
26
28
|
|
|
27
29
|
function CustomEvent(eventName, object) {
|
package/lib/dom/Document.js
CHANGED
|
@@ -20,7 +20,9 @@ var _css = require("../css");
|
|
|
20
20
|
* Document -> Node -> EventTarget
|
|
21
21
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document
|
|
22
22
|
*/
|
|
23
|
-
var Document =
|
|
23
|
+
var Document =
|
|
24
|
+
/** @class */
|
|
25
|
+
function (_super) {
|
|
24
26
|
(0, _tslib.__extends)(Document, _super);
|
|
25
27
|
|
|
26
28
|
function Document() {
|
|
@@ -157,7 +159,7 @@ var Document = function (_super) {
|
|
|
157
159
|
}), clientX = _c.x, clientY = _c.y;
|
|
158
160
|
return [4
|
|
159
161
|
/*yield*/
|
|
160
|
-
, this.defaultView.getRenderingService().hooks.pick.
|
|
162
|
+
, this.defaultView.getRenderingService().hooks.pick.callPromise({
|
|
161
163
|
topmost: true,
|
|
162
164
|
position: {
|
|
163
165
|
x: x,
|
|
@@ -211,7 +213,7 @@ var Document = function (_super) {
|
|
|
211
213
|
}), clientX = _c.x, clientY = _c.y;
|
|
212
214
|
return [4
|
|
213
215
|
/*yield*/
|
|
214
|
-
, this.defaultView.getRenderingService().hooks.pick.
|
|
216
|
+
, this.defaultView.getRenderingService().hooks.pick.callPromise({
|
|
215
217
|
topmost: false,
|
|
216
218
|
position: {
|
|
217
219
|
x: x,
|
package/lib/dom/Element.js
CHANGED
|
@@ -9,8 +9,6 @@ var _tslib = require("tslib");
|
|
|
9
9
|
|
|
10
10
|
var _manaSyringe = require("mana-syringe");
|
|
11
11
|
|
|
12
|
-
var _util = require("@antv/util");
|
|
13
|
-
|
|
14
12
|
var _SceneGraphService = require("../services/SceneGraphService");
|
|
15
13
|
|
|
16
14
|
var _components = require("../components");
|
|
@@ -31,7 +29,9 @@ var entityCounter = 0;
|
|
|
31
29
|
* * Animation
|
|
32
30
|
*/
|
|
33
31
|
|
|
34
|
-
var Element =
|
|
32
|
+
var Element =
|
|
33
|
+
/** @class */
|
|
34
|
+
function (_super) {
|
|
35
35
|
(0, _tslib.__extends)(Element, _super);
|
|
36
36
|
|
|
37
37
|
function Element() {
|
|
@@ -264,15 +264,15 @@ var Element = function (_super) {
|
|
|
264
264
|
};
|
|
265
265
|
|
|
266
266
|
Element.prototype.getElementById = function (id) {
|
|
267
|
-
return this.sceneGraphService.querySelector("#"
|
|
267
|
+
return this.sceneGraphService.querySelector("#".concat(id), this);
|
|
268
268
|
};
|
|
269
269
|
|
|
270
270
|
Element.prototype.getElementsByName = function (name) {
|
|
271
|
-
return this.sceneGraphService.querySelectorAll("[name=\""
|
|
271
|
+
return this.sceneGraphService.querySelectorAll("[name=\"".concat(name, "\"]"), this);
|
|
272
272
|
};
|
|
273
273
|
|
|
274
274
|
Element.prototype.getElementsByClassName = function (className) {
|
|
275
|
-
return this.sceneGraphService.querySelectorAll("."
|
|
275
|
+
return this.sceneGraphService.querySelectorAll(".".concat(className), this);
|
|
276
276
|
};
|
|
277
277
|
|
|
278
278
|
Element.prototype.getElementsByTagName = function (tagName) {
|
|
@@ -531,7 +531,7 @@ var Element = function (_super) {
|
|
|
531
531
|
|
|
532
532
|
var value = this.attributes[attributeName]; // if the given attribute does not exist, the value returned will either be null or ""
|
|
533
533
|
|
|
534
|
-
return (0,
|
|
534
|
+
return (0, _utils.isNil)(value) ? null : value;
|
|
535
535
|
};
|
|
536
536
|
/**
|
|
537
537
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttribute
|
package/lib/dom/EventTarget.js
CHANGED
|
@@ -7,14 +7,14 @@ exports.EventTarget = exports.DELEGATION_SPLITTER = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
10
|
-
var _util = require("@antv/util");
|
|
11
|
-
|
|
12
10
|
var _eventemitter = require("eventemitter3");
|
|
13
11
|
|
|
14
12
|
var _CustomEvent = require("./CustomEvent");
|
|
15
13
|
|
|
16
14
|
var _FederatedEvent = require("./FederatedEvent");
|
|
17
15
|
|
|
16
|
+
var _utils = require("../utils");
|
|
17
|
+
|
|
18
18
|
var DELEGATION_SPLITTER = ':';
|
|
19
19
|
/**
|
|
20
20
|
* Objects that can receive events and may have listeners for them.
|
|
@@ -24,7 +24,9 @@ var DELEGATION_SPLITTER = ':';
|
|
|
24
24
|
|
|
25
25
|
exports.DELEGATION_SPLITTER = DELEGATION_SPLITTER;
|
|
26
26
|
|
|
27
|
-
var EventTarget =
|
|
27
|
+
var EventTarget =
|
|
28
|
+
/** @class */
|
|
29
|
+
function () {
|
|
28
30
|
function EventTarget() {
|
|
29
31
|
/**
|
|
30
32
|
* event emitter
|
|
@@ -48,9 +50,9 @@ var EventTarget = function () {
|
|
|
48
50
|
|
|
49
51
|
|
|
50
52
|
EventTarget.prototype.addEventListener = function (type, listener, options) {
|
|
51
|
-
var capture = (0,
|
|
52
|
-
var once = (0,
|
|
53
|
-
var context = (0,
|
|
53
|
+
var capture = (0, _utils.isBoolean)(options) && options || (0, _utils.isObject)(options) && options.capture;
|
|
54
|
+
var once = (0, _utils.isObject)(options) && options.once;
|
|
55
|
+
var context = (0, _utils.isFunction)(listener) ? undefined : listener; // compatible with G 3.0
|
|
54
56
|
// support using delegate name in event type, eg. 'node:click'
|
|
55
57
|
|
|
56
58
|
var useDelegatedName = false;
|
|
@@ -66,8 +68,8 @@ var EventTarget = function () {
|
|
|
66
68
|
useDelegatedName = true;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
type = capture ? type
|
|
70
|
-
listener = (0,
|
|
71
|
+
type = capture ? "".concat(type, "capture") : type;
|
|
72
|
+
listener = (0, _utils.isFunction)(listener) ? listener : listener.handleEvent; // compatible with G 3.0
|
|
71
73
|
|
|
72
74
|
if (useDelegatedName) {
|
|
73
75
|
var originListener_1 = listener;
|
|
@@ -120,10 +122,10 @@ var EventTarget = function () {
|
|
|
120
122
|
};
|
|
121
123
|
|
|
122
124
|
EventTarget.prototype.removeEventListener = function (type, listener, options) {
|
|
123
|
-
var capture = (0,
|
|
124
|
-
var context = (0,
|
|
125
|
-
type = capture ? type
|
|
126
|
-
listener = (0,
|
|
125
|
+
var capture = (0, _utils.isBoolean)(options) && options || (0, _utils.isObject)(options) && options.capture;
|
|
126
|
+
var context = (0, _utils.isFunction)(listener) ? undefined : listener;
|
|
127
|
+
type = capture ? "".concat(type, "capture") : type;
|
|
128
|
+
listener = (0, _utils.isFunction)(listener) ? listener : listener === null || listener === void 0 ? void 0 : listener.handleEvent;
|
|
127
129
|
this.emitter.off(type, listener, context);
|
|
128
130
|
return this;
|
|
129
131
|
};
|
|
@@ -11,7 +11,9 @@ var _Point = require("../shapes/Point");
|
|
|
11
11
|
* An DOM-compatible synthetic event implementation that is "forwarded" on behalf of an original
|
|
12
12
|
* FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}.
|
|
13
13
|
*/
|
|
14
|
-
var FederatedEvent =
|
|
14
|
+
var FederatedEvent =
|
|
15
|
+
/** @class */
|
|
16
|
+
function () {
|
|
15
17
|
/**
|
|
16
18
|
* The event boundary which manages this event. Propagation can only occur
|
|
17
19
|
* within the boundary's jurisdiction.
|
|
@@ -11,7 +11,9 @@ var _FederatedEvent = require("./FederatedEvent");
|
|
|
11
11
|
|
|
12
12
|
var _Point = require("../shapes/Point");
|
|
13
13
|
|
|
14
|
-
var FederatedMouseEvent =
|
|
14
|
+
var FederatedMouseEvent =
|
|
15
|
+
/** @class */
|
|
16
|
+
function (_super) {
|
|
15
17
|
(0, _tslib.__extends)(FederatedMouseEvent, _super);
|
|
16
18
|
|
|
17
19
|
function FederatedMouseEvent() {
|
|
@@ -9,7 +9,9 @@ var _tslib = require("tslib");
|
|
|
9
9
|
|
|
10
10
|
var _FederatedMouseEvent = require("./FederatedMouseEvent");
|
|
11
11
|
|
|
12
|
-
var FederatedPointerEvent =
|
|
12
|
+
var FederatedPointerEvent =
|
|
13
|
+
/** @class */
|
|
14
|
+
function (_super) {
|
|
13
15
|
(0, _tslib.__extends)(FederatedPointerEvent, _super);
|
|
14
16
|
|
|
15
17
|
function FederatedPointerEvent() {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FormattedTouch } from '../utils';
|
|
2
|
+
import { FederatedEvent } from './FederatedEvent';
|
|
3
|
+
/**
|
|
4
|
+
* @see https://w3c.github.io/touch-events/#touchevent-interface
|
|
5
|
+
*/
|
|
6
|
+
export declare class FederatedTouchEvent extends FederatedEvent<MouseEvent | PointerEvent | TouchEvent> implements TouchEvent {
|
|
7
|
+
pointerType: string;
|
|
8
|
+
altKey: boolean;
|
|
9
|
+
ctrlKey: boolean;
|
|
10
|
+
metaKey: boolean;
|
|
11
|
+
shiftKey: boolean;
|
|
12
|
+
changedTouches: FormattedTouch[];
|
|
13
|
+
targetTouches: FormattedTouch[];
|
|
14
|
+
touches: FormattedTouch[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FederatedTouchEvent = void 0;
|
|
7
|
+
|
|
8
|
+
var _tslib = require("tslib");
|
|
9
|
+
|
|
10
|
+
var _FederatedEvent = require("./FederatedEvent");
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @see https://w3c.github.io/touch-events/#touchevent-interface
|
|
14
|
+
*/
|
|
15
|
+
var FederatedTouchEvent =
|
|
16
|
+
/** @class */
|
|
17
|
+
function (_super) {
|
|
18
|
+
(0, _tslib.__extends)(FederatedTouchEvent, _super);
|
|
19
|
+
|
|
20
|
+
function FederatedTouchEvent() {
|
|
21
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return FederatedTouchEvent;
|
|
25
|
+
}(_FederatedEvent.FederatedEvent);
|
|
26
|
+
|
|
27
|
+
exports.FederatedTouchEvent = FederatedTouchEvent;
|