@antv/g 5.0.14 → 5.0.17
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.d.ts +3 -0
- package/es/Canvas.js +10 -12
- package/es/DisplayObjectPool.js +1 -3
- package/es/camera/Camera.d.ts +3 -2
- package/es/camera/Camera.js +17 -11
- package/es/camera/Landmark.js +1 -3
- package/es/canvas-module.js +11 -17
- 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.d.ts +0 -1
- package/es/components/Transform.js +1 -4
- package/es/display-objects/Circle.d.ts +4 -2
- package/es/display-objects/Circle.js +9 -6
- package/es/display-objects/CustomElement.d.ts +3 -2
- package/es/display-objects/CustomElement.js +10 -9
- package/es/display-objects/DisplayObject.d.ts +9 -3
- package/es/display-objects/DisplayObject.js +98 -50
- package/es/display-objects/Ellipse.d.ts +6 -3
- package/es/display-objects/Ellipse.js +9 -6
- package/es/display-objects/Group.d.ts +18 -2
- package/es/display-objects/Group.js +15 -12
- package/es/display-objects/HTML.d.ts +6 -1
- package/es/display-objects/HTML.js +8 -6
- package/es/display-objects/Image.d.ts +12 -7
- package/es/display-objects/Image.js +11 -6
- package/es/display-objects/Line.d.ts +1 -1
- package/es/display-objects/Line.js +13 -7
- package/es/display-objects/Path.d.ts +3 -2
- package/es/display-objects/Path.js +11 -8
- package/es/display-objects/Polygon.d.ts +1 -1
- package/es/display-objects/Polygon.js +10 -6
- package/es/display-objects/Polyline.d.ts +1 -1
- package/es/display-objects/Polyline.js +11 -8
- package/es/display-objects/Rect.d.ts +8 -5
- package/es/display-objects/Rect.js +10 -7
- package/es/display-objects/TSpan.d.ts +1 -0
- package/es/display-objects/TSpan.js +0 -0
- package/es/display-objects/Text.d.ts +32 -4
- package/es/display-objects/Text.js +71 -14
- 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 +2 -5
- package/es/dom/CustomElementRegistry.js +13 -15
- package/es/dom/CustomEvent.js +1 -3
- package/es/dom/Document.d.ts +2 -1
- package/es/dom/Document.js +23 -5
- package/es/dom/Element.d.ts +36 -9
- package/es/dom/Element.js +103 -15
- package/es/dom/EventTarget.d.ts +2 -2
- package/es/dom/EventTarget.js +3 -4
- package/es/dom/FederatedEvent.d.ts +5 -2
- 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/MutationEvent.d.ts +15 -0
- package/es/dom/MutationEvent.js +27 -0
- package/es/dom/MutationObserver.d.ts +36 -0
- package/es/dom/MutationObserver.js +406 -0
- package/es/dom/MutationRecord.d.ts +14 -0
- package/es/dom/MutationRecord.js +29 -0
- package/es/dom/Node.d.ts +35 -3
- package/es/dom/Node.js +185 -20
- package/es/dom/index.d.ts +3 -0
- package/es/dom/index.js +3 -0
- package/es/dom/interfaces.d.ts +36 -8
- package/es/dom/interfaces.js +23 -5
- package/es/global-module.d.ts +4 -1
- package/es/global-module.js +36 -79
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/plugins/CullingPlugin.d.ts +0 -2
- package/es/plugins/CullingPlugin.js +4 -27
- package/es/plugins/DirtyCheckPlugin.js +3 -5
- package/es/plugins/EventPlugin.d.ts +2 -1
- package/es/plugins/EventPlugin.js +16 -8
- package/es/plugins/FrustumCullingStrategy.d.ts +1 -0
- package/es/plugins/FrustumCullingStrategy.js +40 -35
- package/es/plugins/PrepareRendererPlugin.js +22 -8
- package/es/property-handlers/aabb.js +22 -24
- package/es/property-handlers/anchor.js +2 -1
- package/es/property-handlers/color.js +3 -0
- package/es/property-handlers/dimension.d.ts +15 -2
- package/es/property-handlers/dimension.js +77 -8
- package/es/property-handlers/index.d.ts +3 -0
- package/es/property-handlers/index.js +4 -1
- package/es/property-handlers/inherit.d.ts +6 -0
- package/es/property-handlers/inherit.js +25 -0
- package/es/property-handlers/interfaces.d.ts +2 -2
- package/es/property-handlers/lineDash.d.ts +6 -1
- package/es/property-handlers/lineDash.js +23 -4
- package/es/property-handlers/offsetDistance.js +2 -2
- package/es/property-handlers/path.d.ts +1 -1
- package/es/property-handlers/text.d.ts +2 -0
- package/es/property-handlers/text.js +3 -0
- package/es/property-handlers/textTransform.d.ts +6 -0
- package/es/property-handlers/textTransform.js +19 -0
- package/es/services/EventService.js +2 -6
- package/es/services/RenderingContext.d.ts +5 -8
- package/es/services/RenderingContext.js +6 -7
- package/es/services/RenderingService.js +3 -11
- package/es/services/SceneGraphSelector.d.ts +3 -2
- package/es/services/SceneGraphSelector.js +9 -7
- package/es/services/SceneGraphService.d.ts +7 -14
- package/es/services/SceneGraphService.js +15 -85
- package/es/services/aabb/CircleUpdater.d.ts +2 -2
- package/es/services/aabb/CircleUpdater.js +22 -14
- package/es/services/aabb/EllipseUpdater.d.ts +2 -2
- package/es/services/aabb/EllipseUpdater.js +29 -16
- package/es/services/aabb/LineUpdater.js +3 -5
- package/es/services/aabb/PathUpdater.js +3 -5
- package/es/services/aabb/PolylineUpdater.js +4 -6
- package/es/services/aabb/RectUpdater.d.ts +2 -2
- package/es/services/aabb/RectUpdater.js +32 -21
- package/es/services/aabb/TextUpdater.js +20 -13
- package/es/services/text/OffscreenCanvasCreator.js +1 -3
- package/es/services/text/index.js +18 -22
- package/es/shapes/AABB.d.ts +1 -0
- package/es/shapes/AABB.js +9 -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/Polygon.js +1 -3
- package/es/shapes/Ray.js +1 -3
- package/es/shapes/Rect.js +1 -3
- package/es/shapes/Rectangle.js +1 -3
- package/es/types.d.ts +48 -26
- package/es/types.js +50 -31
- package/es/utils/animation.js +1 -1
- package/es/utils/event.js +5 -3
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +2 -1
- package/es/utils/interpolation.d.ts +1 -0
- package/es/utils/interpolation.js +41 -8
- package/es/utils/path.d.ts +1 -1
- package/es/utils/path.js +13 -13
- package/es/utils/raf.d.ts +1 -1
- package/es/utils/raf.js +0 -2
- package/es/utils/string.d.ts +1 -0
- package/es/utils/string.js +9 -0
- package/es/utils/text.js +1 -1
- package/lib/AbstractRenderer.js +1 -3
- package/lib/Canvas.d.ts +3 -0
- package/lib/Canvas.js +9 -11
- package/lib/DisplayObjectPool.js +1 -3
- package/lib/camera/Camera.d.ts +3 -2
- package/lib/camera/Camera.js +21 -13
- package/lib/camera/Landmark.js +1 -3
- package/lib/canvas-module.js +10 -15
- 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.d.ts +0 -1
- package/lib/components/Transform.js +1 -4
- package/lib/display-objects/Circle.d.ts +4 -2
- package/lib/display-objects/Circle.js +8 -5
- package/lib/display-objects/CustomElement.d.ts +3 -2
- package/lib/display-objects/CustomElement.js +10 -9
- package/lib/display-objects/DisplayObject.d.ts +9 -3
- package/lib/display-objects/DisplayObject.js +98 -47
- package/lib/display-objects/Ellipse.d.ts +6 -3
- package/lib/display-objects/Ellipse.js +8 -5
- package/lib/display-objects/Group.d.ts +18 -2
- package/lib/display-objects/Group.js +14 -12
- package/lib/display-objects/HTML.d.ts +6 -1
- package/lib/display-objects/HTML.js +7 -5
- package/lib/display-objects/Image.d.ts +12 -7
- package/lib/display-objects/Image.js +10 -5
- package/lib/display-objects/Line.d.ts +1 -1
- package/lib/display-objects/Line.js +12 -6
- package/lib/display-objects/Path.d.ts +3 -2
- package/lib/display-objects/Path.js +10 -7
- package/lib/display-objects/Polygon.d.ts +1 -1
- package/lib/display-objects/Polygon.js +9 -5
- package/lib/display-objects/Polyline.d.ts +1 -1
- package/lib/display-objects/Polyline.js +10 -7
- package/lib/display-objects/Rect.d.ts +8 -5
- package/lib/display-objects/Rect.js +9 -6
- package/lib/display-objects/TSpan.d.ts +1 -0
- package/lib/display-objects/TSpan.js +1 -0
- package/lib/display-objects/Text.d.ts +32 -4
- package/lib/display-objects/Text.js +71 -13
- 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 +3 -6
- package/lib/dom/CustomElementRegistry.js +12 -14
- package/lib/dom/CustomEvent.js +1 -3
- package/lib/dom/Document.d.ts +2 -1
- package/lib/dom/Document.js +25 -6
- package/lib/dom/Element.d.ts +36 -9
- package/lib/dom/Element.js +105 -15
- package/lib/dom/EventTarget.d.ts +2 -2
- package/lib/dom/EventTarget.js +3 -4
- package/lib/dom/FederatedEvent.d.ts +5 -2
- 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/MutationEvent.d.ts +15 -0
- package/lib/dom/MutationEvent.js +35 -0
- package/lib/dom/MutationObserver.d.ts +36 -0
- package/lib/dom/MutationObserver.js +417 -0
- package/lib/dom/MutationRecord.d.ts +14 -0
- package/lib/dom/MutationRecord.js +36 -0
- package/lib/dom/Node.d.ts +35 -3
- package/lib/dom/Node.js +186 -19
- package/lib/dom/index.d.ts +3 -0
- package/lib/dom/index.js +39 -0
- package/lib/dom/interfaces.d.ts +36 -8
- package/lib/dom/interfaces.js +23 -5
- package/lib/global-module.d.ts +4 -1
- package/lib/global-module.js +42 -76
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/plugins/CullingPlugin.d.ts +0 -2
- package/lib/plugins/CullingPlugin.js +4 -27
- package/lib/plugins/DirtyCheckPlugin.js +2 -4
- package/lib/plugins/EventPlugin.d.ts +2 -1
- package/lib/plugins/EventPlugin.js +14 -8
- package/lib/plugins/FrustumCullingStrategy.d.ts +1 -0
- package/lib/plugins/FrustumCullingStrategy.js +41 -35
- package/lib/plugins/PrepareRendererPlugin.js +25 -7
- package/lib/property-handlers/aabb.js +21 -23
- package/lib/property-handlers/anchor.js +3 -1
- package/lib/property-handlers/color.js +5 -2
- package/lib/property-handlers/dimension.d.ts +15 -2
- package/lib/property-handlers/dimension.js +84 -12
- package/lib/property-handlers/index.d.ts +3 -0
- package/lib/property-handlers/index.js +39 -0
- package/lib/property-handlers/inherit.d.ts +6 -0
- package/lib/property-handlers/inherit.js +34 -0
- package/lib/property-handlers/interfaces.d.ts +2 -2
- package/lib/property-handlers/interfaces.js +1 -1
- package/lib/property-handlers/lineDash.d.ts +6 -1
- package/lib/property-handlers/lineDash.js +25 -4
- package/lib/property-handlers/numeric.js +3 -3
- package/lib/property-handlers/offsetDistance.js +1 -1
- package/lib/property-handlers/path.d.ts +1 -1
- package/lib/property-handlers/path.js +1 -1
- package/lib/property-handlers/text.d.ts +2 -0
- package/lib/property-handlers/text.js +10 -0
- package/lib/property-handlers/textTransform.d.ts +6 -0
- package/lib/property-handlers/textTransform.js +27 -0
- package/lib/property-handlers/transform.js +1 -1
- package/lib/services/EventService.js +2 -6
- package/lib/services/RenderingContext.d.ts +5 -8
- package/lib/services/RenderingContext.js +8 -9
- package/lib/services/RenderingService.js +2 -10
- package/lib/services/SceneGraphSelector.d.ts +3 -2
- package/lib/services/SceneGraphSelector.js +12 -7
- package/lib/services/SceneGraphService.d.ts +7 -14
- package/lib/services/SceneGraphService.js +18 -87
- package/lib/services/aabb/CircleUpdater.d.ts +2 -2
- package/lib/services/aabb/CircleUpdater.js +21 -13
- package/lib/services/aabb/EllipseUpdater.d.ts +2 -2
- package/lib/services/aabb/EllipseUpdater.js +28 -15
- package/lib/services/aabb/LineUpdater.js +2 -4
- package/lib/services/aabb/PathUpdater.js +2 -4
- package/lib/services/aabb/PolylineUpdater.js +3 -5
- package/lib/services/aabb/RectUpdater.d.ts +2 -2
- package/lib/services/aabb/RectUpdater.js +31 -20
- package/lib/services/aabb/TextUpdater.js +19 -12
- package/lib/services/aabb/index.js +10 -10
- package/lib/services/aabb/interfaces.js +1 -1
- package/lib/services/text/OffscreenCanvasCreator.js +1 -3
- package/lib/services/text/index.js +18 -22
- package/lib/shapes/AABB.d.ts +1 -0
- package/lib/shapes/AABB.js +9 -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/Polygon.js +1 -3
- package/lib/shapes/Ray.js +1 -3
- package/lib/shapes/Rect.js +1 -3
- package/lib/shapes/Rectangle.js +1 -3
- package/lib/types.d.ts +48 -26
- package/lib/types.js +56 -35
- package/lib/utils/animation.js +3 -4
- package/lib/utils/bezier-easing.js +1 -1
- package/lib/utils/custom-easing.js +1 -1
- package/lib/utils/event.js +7 -6
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +13 -0
- package/lib/utils/interpolation.d.ts +1 -0
- package/lib/utils/interpolation.js +43 -7
- package/lib/utils/math.js +5 -5
- package/lib/utils/path.d.ts +1 -1
- package/lib/utils/path.js +15 -15
- package/lib/utils/raf.d.ts +1 -1
- package/lib/utils/raf.js +1 -4
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/string.js +16 -0
- package/lib/utils/text.js +1 -1
- package/package.json +6 -4
- package/dist/index.umd.min.js +0 -15
|
@@ -11,7 +11,7 @@ export interface ParsedPolylineStyleProps {
|
|
|
11
11
|
totalLength: number;
|
|
12
12
|
}
|
|
13
13
|
export declare class Polyline extends DisplayObject<PolylineStyleProps, ParsedBaseStyleProps> {
|
|
14
|
-
constructor({ style, ...rest }
|
|
14
|
+
constructor({ style, ...rest }?: DisplayObjectConfig<PolylineStyleProps>);
|
|
15
15
|
getTotalLength(): number;
|
|
16
16
|
getPoint(ratio: number): Point;
|
|
17
17
|
getStartTangent(): number[][];
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { __assign, __extends, __rest } from "tslib";
|
|
2
2
|
import { Line as LineUtil } from '@antv/g-math';
|
|
3
|
-
import {
|
|
3
|
+
import { Shape, LineCap, LineJoin } 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) {
|
|
11
|
+
if (_a === void 0) {
|
|
12
|
+
_a = {};
|
|
13
|
+
}
|
|
14
|
+
|
|
13
15
|
var style = _a.style,
|
|
14
16
|
rest = __rest(_a, ["style"]);
|
|
15
17
|
|
|
16
18
|
return _super.call(this, __assign({
|
|
17
|
-
type:
|
|
19
|
+
type: Shape.POLYLINE,
|
|
18
20
|
style: __assign({
|
|
19
21
|
points: [],
|
|
20
|
-
lineJoin:
|
|
21
|
-
lineCap:
|
|
22
|
-
lineWidth: 1
|
|
22
|
+
lineJoin: LineJoin.MITER,
|
|
23
|
+
lineCap: LineCap.BUTT,
|
|
24
|
+
lineWidth: 1,
|
|
25
|
+
miterLimit: 4
|
|
23
26
|
}, style)
|
|
24
27
|
}, rest)) || this;
|
|
25
28
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
2
2
|
import { DisplayObject } from './DisplayObject';
|
|
3
3
|
import type { DisplayObjectConfig } from '../dom';
|
|
4
|
+
import type { ParsedElement } from '../property-handlers';
|
|
4
5
|
export interface RectStyleProps extends BaseStyleProps {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
6
|
+
width: number | string;
|
|
7
|
+
height: number | string;
|
|
7
8
|
radius?: number;
|
|
8
9
|
}
|
|
9
10
|
export interface ParsedRectStyleProps extends ParsedBaseStyleProps {
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
11
|
+
width: ParsedElement;
|
|
12
|
+
height: ParsedElement;
|
|
13
|
+
widthInPixels: number;
|
|
14
|
+
heightInPixels: number;
|
|
12
15
|
radius?: number;
|
|
13
16
|
}
|
|
14
17
|
export declare class Rect extends DisplayObject<RectStyleProps, ParsedRectStyleProps> {
|
|
15
|
-
constructor({ style, ...rest }
|
|
18
|
+
constructor({ style, ...rest }?: DisplayObjectConfig<RectStyleProps>);
|
|
16
19
|
}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { __assign, __extends, __rest } from "tslib";
|
|
2
|
-
import {
|
|
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) {
|
|
9
|
+
if (_a === void 0) {
|
|
10
|
+
_a = {};
|
|
11
|
+
}
|
|
12
|
+
|
|
11
13
|
var style = _a.style,
|
|
12
14
|
rest = __rest(_a, ["style"]);
|
|
13
15
|
|
|
14
16
|
return _super.call(this, __assign({
|
|
15
|
-
type:
|
|
17
|
+
type: Shape.RECT,
|
|
16
18
|
style: __assign({
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
19
|
+
width: 'auto',
|
|
20
|
+
height: 'auto',
|
|
21
|
+
lineWidth: 0
|
|
19
22
|
}, style)
|
|
20
23
|
}, rest)) || this;
|
|
21
24
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -2,16 +2,17 @@ import type { TextMetrics } from '../services/text';
|
|
|
2
2
|
import type { DisplayObjectConfig } from '../dom/interfaces';
|
|
3
3
|
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
4
4
|
import { DisplayObject } from './DisplayObject';
|
|
5
|
+
import type { ParsedElement } from '../property-handlers';
|
|
5
6
|
export interface TextStyleProps extends BaseStyleProps {
|
|
6
7
|
text: string;
|
|
7
8
|
/** 设置文本内容的当前对齐方式 */
|
|
8
|
-
textAlign?: 'start' | 'center' | 'end' | 'left' | 'right';
|
|
9
|
+
textAlign?: 'inherit' | 'start' | 'center' | 'end' | 'left' | 'right';
|
|
9
10
|
/** 设置在绘制文本时使用的当前文本基线 */
|
|
10
11
|
textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
|
|
11
12
|
/** 字体样式 */
|
|
12
13
|
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
13
14
|
/** 文本字体大小 */
|
|
14
|
-
fontSize?: number;
|
|
15
|
+
fontSize?: number | string;
|
|
15
16
|
/** 文本字体 */
|
|
16
17
|
fontFamily?: string;
|
|
17
18
|
/** 文本粗细 */
|
|
@@ -28,6 +29,8 @@ export interface TextStyleProps extends BaseStyleProps {
|
|
|
28
29
|
wordWrapWidth?: number;
|
|
29
30
|
dropShadow?: boolean;
|
|
30
31
|
dropShadowDistance?: number;
|
|
32
|
+
dx?: number | string;
|
|
33
|
+
dy?: number | string;
|
|
31
34
|
}
|
|
32
35
|
export interface ParsedTextStyleProps extends ParsedBaseStyleProps {
|
|
33
36
|
text: string;
|
|
@@ -38,7 +41,7 @@ export interface ParsedTextStyleProps extends ParsedBaseStyleProps {
|
|
|
38
41
|
/** 字体样式 */
|
|
39
42
|
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
40
43
|
/** 文本字体大小 */
|
|
41
|
-
fontSize?:
|
|
44
|
+
fontSize?: ParsedElement;
|
|
42
45
|
/** 文本字体 */
|
|
43
46
|
fontFamily?: string;
|
|
44
47
|
/** 文本粗细 */
|
|
@@ -56,8 +59,33 @@ export interface ParsedTextStyleProps extends ParsedBaseStyleProps {
|
|
|
56
59
|
dropShadow?: boolean;
|
|
57
60
|
dropShadowDistance?: number;
|
|
58
61
|
metrics?: TextMetrics;
|
|
62
|
+
dx?: ParsedElement;
|
|
63
|
+
dy?: ParsedElement;
|
|
59
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* <text> @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement
|
|
67
|
+
*/
|
|
60
68
|
export declare class Text extends DisplayObject<TextStyleProps, ParsedTextStyleProps> {
|
|
61
|
-
|
|
69
|
+
/**
|
|
70
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
|
|
71
|
+
*/
|
|
72
|
+
LENGTHADJUST_SPACING: number;
|
|
73
|
+
LENGTHADJUST_SPACINGANDGLYPHS: number;
|
|
74
|
+
LENGTHADJUST_UNKNOWN: number;
|
|
75
|
+
constructor({ style, ...rest }?: DisplayObjectConfig<TextStyleProps>);
|
|
76
|
+
lengthAdjust: SVGAnimatedEnumeration;
|
|
77
|
+
textLength: SVGAnimatedLength;
|
|
78
|
+
getCharNumAtPosition(point?: DOMPointInit): number;
|
|
79
|
+
/**
|
|
80
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement
|
|
81
|
+
*/
|
|
82
|
+
getComputedTextLength(): number;
|
|
83
|
+
getEndPositionOfChar(charnum: number): DOMPoint;
|
|
84
|
+
getExtentOfChar(charnum: number): DOMRect;
|
|
85
|
+
getNumberOfChars(): number;
|
|
86
|
+
getRotationOfChar(charnum: number): number;
|
|
87
|
+
getStartPositionOfChar(charnum: number): DOMPoint;
|
|
88
|
+
getSubStringLength(charnum: number, nchars: number): number;
|
|
89
|
+
selectSubString(charnum: number, nchars: number): void;
|
|
62
90
|
getLineBoundingRects(): import("..").Rectangle[];
|
|
63
91
|
}
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import { __assign, __extends, __rest } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { Shape, LineJoin, LineCap } from '../types';
|
|
3
3
|
import { DisplayObject } from './DisplayObject';
|
|
4
|
+
/**
|
|
5
|
+
* <text> @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement
|
|
6
|
+
*/
|
|
4
7
|
|
|
5
|
-
var Text =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
8
|
+
var Text = function (_super) {
|
|
8
9
|
__extends(Text, _super);
|
|
9
10
|
|
|
10
11
|
function Text(_a) {
|
|
12
|
+
if (_a === void 0) {
|
|
13
|
+
_a = {};
|
|
14
|
+
}
|
|
15
|
+
|
|
11
16
|
var style = _a.style,
|
|
12
17
|
rest = __rest(_a, ["style"]);
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
type:
|
|
19
|
+
var _this = _super.call(this, __assign({
|
|
20
|
+
type: Shape.TEXT,
|
|
16
21
|
style: __assign({
|
|
17
22
|
text: '',
|
|
18
|
-
fontSize:
|
|
19
|
-
fontFamily: '
|
|
23
|
+
fontSize: 'inherit',
|
|
24
|
+
fontFamily: 'inherit',
|
|
20
25
|
fontStyle: 'normal',
|
|
21
26
|
fontWeight: 'normal',
|
|
22
27
|
fontVariant: 'normal',
|
|
23
|
-
textAlign: '
|
|
28
|
+
textAlign: 'inherit',
|
|
24
29
|
textBaseline: 'alphabetic',
|
|
25
30
|
dropShadow: false,
|
|
26
31
|
// dropShadowAlpha: 1,
|
|
@@ -31,20 +36,72 @@ function (_super) {
|
|
|
31
36
|
fill: '#000',
|
|
32
37
|
letterSpacing: 0,
|
|
33
38
|
lineHeight: 0,
|
|
34
|
-
lineJoin:
|
|
35
|
-
lineCap:
|
|
39
|
+
lineJoin: LineJoin.MITER,
|
|
40
|
+
lineCap: LineCap.BUTT,
|
|
36
41
|
lineWidth: 0,
|
|
37
42
|
miterLimit: 10,
|
|
38
|
-
// padding: 0,
|
|
39
43
|
stroke: '#000',
|
|
40
44
|
whiteSpace: 'pre',
|
|
41
45
|
wordWrap: false,
|
|
42
|
-
wordWrapWidth:
|
|
43
|
-
leading: 0
|
|
46
|
+
wordWrapWidth: 0,
|
|
47
|
+
leading: 0,
|
|
48
|
+
dx: 0,
|
|
49
|
+
dy: 0
|
|
44
50
|
}, style)
|
|
45
51
|
}, rest)) || this;
|
|
52
|
+
/**
|
|
53
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
_this.LENGTHADJUST_SPACING = 1;
|
|
58
|
+
_this.LENGTHADJUST_SPACINGANDGLYPHS = 2;
|
|
59
|
+
_this.LENGTHADJUST_UNKNOWN = 0;
|
|
60
|
+
return _this;
|
|
46
61
|
}
|
|
47
62
|
|
|
63
|
+
Text.prototype.getCharNumAtPosition = function (point) {
|
|
64
|
+
throw new Error('Method not implemented.');
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Text.prototype.getComputedTextLength = function () {
|
|
72
|
+
var _a;
|
|
73
|
+
|
|
74
|
+
return ((_a = this.parsedStyle.metrics) === null || _a === void 0 ? void 0 : _a.maxLineWidth) || 0;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
Text.prototype.getEndPositionOfChar = function (charnum) {
|
|
78
|
+
throw new Error('Method not implemented.');
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
Text.prototype.getExtentOfChar = function (charnum) {
|
|
82
|
+
throw new Error('Method not implemented.');
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
Text.prototype.getNumberOfChars = function () {
|
|
86
|
+
throw new Error('Method not implemented.');
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
Text.prototype.getRotationOfChar = function (charnum) {
|
|
90
|
+
throw new Error('Method not implemented.');
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
Text.prototype.getStartPositionOfChar = function (charnum) {
|
|
94
|
+
throw new Error('Method not implemented.');
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
Text.prototype.getSubStringLength = function (charnum, nchars) {
|
|
98
|
+
throw new Error('Method not implemented.');
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
Text.prototype.selectSubString = function (charnum, nchars) {
|
|
102
|
+
throw new Error('Method not implemented.');
|
|
103
|
+
};
|
|
104
|
+
|
|
48
105
|
Text.prototype.getLineBoundingRects = function () {
|
|
49
106
|
var _a;
|
|
50
107
|
|
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
|
/**
|
|
@@ -232,7 +230,7 @@ function () {
|
|
|
232
230
|
get: function get() {
|
|
233
231
|
var _a;
|
|
234
232
|
|
|
235
|
-
return Number((_a = this.effect) === null || _a === void 0 ? void 0 : _a.getComputedTiming().
|
|
233
|
+
return Number((_a = this.effect) === null || _a === void 0 ? void 0 : _a.getComputedTiming().endTime);
|
|
236
234
|
},
|
|
237
235
|
enumerable: false,
|
|
238
236
|
configurable: true
|
|
@@ -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) {
|
|
@@ -8,9 +8,7 @@ export function compareAnimations(leftAnimation, rightAnimation) {
|
|
|
8
8
|
* @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/web-animations-js/index.d.ts
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var AnimationTimeline =
|
|
12
|
-
/** @class */
|
|
13
|
-
function () {
|
|
11
|
+
var AnimationTimeline = function () {
|
|
14
12
|
function AnimationTimeline() {
|
|
15
13
|
var _this = this;
|
|
16
14
|
/**
|
|
@@ -153,8 +151,7 @@ function () {
|
|
|
153
151
|
|
|
154
152
|
this.rafCallbacks.push([id, f]);
|
|
155
153
|
return id;
|
|
156
|
-
};
|
|
157
|
-
|
|
154
|
+
};
|
|
158
155
|
|
|
159
156
|
AnimationTimeline.prototype.requestAnimationFrame = function (f) {
|
|
160
157
|
var _this = this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Shape } from '../types';
|
|
2
2
|
import { Ellipse, Circle, Rect, Image, Line, Path, Group, Polygon, Polyline, Text, HTML } from '../display-objects';
|
|
3
3
|
/**
|
|
4
4
|
* canvas.customElements
|
|
@@ -6,22 +6,20 @@ 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
|
-
this.define(
|
|
15
|
-
this.define(
|
|
16
|
-
this.define(
|
|
17
|
-
this.define(
|
|
18
|
-
this.define(
|
|
19
|
-
this.define(
|
|
20
|
-
this.define(
|
|
21
|
-
this.define(
|
|
22
|
-
this.define(
|
|
23
|
-
this.define(
|
|
24
|
-
this.define(
|
|
12
|
+
this.define(Shape.CIRCLE, Circle);
|
|
13
|
+
this.define(Shape.ELLIPSE, Ellipse);
|
|
14
|
+
this.define(Shape.RECT, Rect);
|
|
15
|
+
this.define(Shape.IMAGE, Image);
|
|
16
|
+
this.define(Shape.LINE, Line);
|
|
17
|
+
this.define(Shape.GROUP, Group);
|
|
18
|
+
this.define(Shape.PATH, Path);
|
|
19
|
+
this.define(Shape.POLYGON, Polygon);
|
|
20
|
+
this.define(Shape.POLYLINE, Polyline);
|
|
21
|
+
this.define(Shape.TEXT, Text);
|
|
22
|
+
this.define(Shape.HTML, HTML);
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
CustomElementRegistry.prototype.define = function (name, constructor) {
|
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.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Node } from './Node';
|
|
2
2
|
import { AnimationTimeline } from './AnimationTimeline';
|
|
3
|
-
import { Group } from '../display-objects
|
|
3
|
+
import { Group } from '../display-objects';
|
|
4
4
|
import type { DisplayObject } from '../display-objects/DisplayObject';
|
|
5
5
|
import type { IDocument, IElement, INode, ICanvas, DisplayObjectConfig } from './interfaces';
|
|
6
6
|
import type { BaseStyleProps } from '../types';
|
|
@@ -34,6 +34,7 @@ export declare class Document extends Node implements IDocument {
|
|
|
34
34
|
* @example const circle = document.createElement('circle', { style: { r: 10 } });
|
|
35
35
|
*/
|
|
36
36
|
createElement<T extends DisplayObject<StyleProps>, StyleProps extends BaseStyleProps>(tagName: string, options: DisplayObjectConfig<StyleProps>): T;
|
|
37
|
+
createElementNS<T extends DisplayObject<StyleProps>, StyleProps extends BaseStyleProps>(namespaceURI: string, tagName: string, options: DisplayObjectConfig<StyleProps>): T;
|
|
37
38
|
cloneNode(deep?: boolean): this;
|
|
38
39
|
destroy(): void;
|
|
39
40
|
/**
|
package/es/dom/Document.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { Node } from './Node';
|
|
3
3
|
import { AnimationTimeline } from './AnimationTimeline';
|
|
4
|
-
import { Group } from '../display-objects
|
|
4
|
+
import { Group, Text } from '../display-objects';
|
|
5
|
+
import { TextAlign } from '../types';
|
|
5
6
|
/**
|
|
6
7
|
* the entry of DOM tree
|
|
7
8
|
* Document -> Node -> EventTarget
|
|
8
9
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
|
-
var Document =
|
|
12
|
-
/** @class */
|
|
13
|
-
function (_super) {
|
|
12
|
+
var Document = function (_super) {
|
|
14
13
|
__extends(Document, _super);
|
|
15
14
|
|
|
16
15
|
function Document() {
|
|
@@ -28,7 +27,15 @@ function (_super) {
|
|
|
28
27
|
_this.timeline = new AnimationTimeline(); // like <html> in DOM tree
|
|
29
28
|
|
|
30
29
|
_this.documentElement = new Group({
|
|
31
|
-
id: 'g-root'
|
|
30
|
+
id: 'g-root',
|
|
31
|
+
style: {
|
|
32
|
+
textAlign: TextAlign.START,
|
|
33
|
+
fontSize: '16px',
|
|
34
|
+
fontFamily: 'sans-serif' // fontStyle: 'normal',
|
|
35
|
+
// fontWeight: 'normal',
|
|
36
|
+
// fontVariant: 'normal',
|
|
37
|
+
|
|
38
|
+
}
|
|
32
39
|
});
|
|
33
40
|
_this.documentElement.ownerDocument = _this;
|
|
34
41
|
_this.documentElement.parentNode = _this;
|
|
@@ -69,8 +76,19 @@ function (_super) {
|
|
|
69
76
|
*/
|
|
70
77
|
|
|
71
78
|
Document.prototype.createElement = function (tagName, options) {
|
|
79
|
+
// d3 will use <tspan>
|
|
72
80
|
var clazz = this.defaultView.customElements.get(tagName);
|
|
81
|
+
|
|
82
|
+
if (!clazz) {
|
|
83
|
+
console.warn('Unsupported tagName: ', tagName);
|
|
84
|
+
clazz = tagName === 'tspan' ? Text : Group;
|
|
85
|
+
}
|
|
86
|
+
|
|
73
87
|
return new clazz(options);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
Document.prototype.createElementNS = function (namespaceURI, tagName, options) {
|
|
91
|
+
return this.createElement(tagName, options);
|
|
74
92
|
}; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
93
|
|
|
76
94
|
|
package/es/dom/Element.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Cullable, Geometry, Renderable, Transform, Sortable } from '../componen
|
|
|
3
3
|
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
4
4
|
import { Node } from './Node';
|
|
5
5
|
import type { AABB, Rectangle } from '../shapes';
|
|
6
|
-
import type { IEventTarget, IElement, INode } from './interfaces';
|
|
6
|
+
import type { IEventTarget, IElement, INode, ICSSStyleDeclaration } from './interfaces';
|
|
7
7
|
/**
|
|
8
8
|
* Has following capabilities:
|
|
9
9
|
* * Node insert/remove, eg. appendChild, removeChild, remove...
|
|
@@ -28,12 +28,17 @@ export declare class Element<StyleProps extends BaseStyleProps = any, ParsedStyl
|
|
|
28
28
|
* used in `getElementsByClassName`
|
|
29
29
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
|
|
30
30
|
*/
|
|
31
|
-
className: string;
|
|
31
|
+
get className(): string;
|
|
32
|
+
set className(className: string);
|
|
32
33
|
/**
|
|
33
34
|
* used in `getElementsByName`
|
|
34
35
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByName
|
|
35
36
|
*/
|
|
36
37
|
name: string;
|
|
38
|
+
/**
|
|
39
|
+
* https://developer.mozilla.org/zh-CN/docs/Web/API/Element/namespaceURI
|
|
40
|
+
*/
|
|
41
|
+
namespaceURI: string;
|
|
37
42
|
/**
|
|
38
43
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
|
|
39
44
|
*/
|
|
@@ -103,16 +108,16 @@ export declare class Element<StyleProps extends BaseStyleProps = any, ParsedStyl
|
|
|
103
108
|
*/
|
|
104
109
|
destroyed: boolean;
|
|
105
110
|
destroy(): void;
|
|
106
|
-
getGeometryBounds(): AABB
|
|
107
|
-
getRenderBounds(): AABB
|
|
111
|
+
getGeometryBounds(): AABB;
|
|
112
|
+
getRenderBounds(): AABB;
|
|
108
113
|
/**
|
|
109
114
|
* get bounds in world space, account for children
|
|
110
115
|
*/
|
|
111
|
-
getBounds(): AABB
|
|
116
|
+
getBounds(): AABB;
|
|
112
117
|
/**
|
|
113
118
|
* get bounds in local space, account for children
|
|
114
119
|
*/
|
|
115
|
-
getLocalBounds(): AABB
|
|
120
|
+
getLocalBounds(): AABB;
|
|
116
121
|
/**
|
|
117
122
|
* account for context's bounds in client space,
|
|
118
123
|
* but not accounting for children
|
|
@@ -127,16 +132,28 @@ export declare class Element<StyleProps extends BaseStyleProps = any, ParsedStyl
|
|
|
127
132
|
* compatible with `style`
|
|
128
133
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
|
|
129
134
|
*/
|
|
130
|
-
style: StyleProps
|
|
135
|
+
style: StyleProps & ICSSStyleDeclaration<StyleProps>;
|
|
131
136
|
parsedStyle: ParsedStyleProps;
|
|
132
137
|
/**
|
|
133
138
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes
|
|
134
139
|
*/
|
|
135
|
-
attributes: StyleProps;
|
|
140
|
+
readonly attributes: StyleProps;
|
|
141
|
+
/**
|
|
142
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNames
|
|
143
|
+
*/
|
|
144
|
+
getAttributeNames(): string[];
|
|
136
145
|
/**
|
|
137
146
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute
|
|
138
147
|
*/
|
|
139
|
-
getAttribute(
|
|
148
|
+
getAttribute(name: keyof StyleProps): any;
|
|
149
|
+
/**
|
|
150
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttribute
|
|
151
|
+
*/
|
|
152
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttributes
|
|
155
|
+
*/
|
|
156
|
+
hasAttributes(): boolean;
|
|
140
157
|
/**
|
|
141
158
|
* should use removeAttribute() instead of setting the attribute value to null either directly or using setAttribute(). Many attributes will not behave as expected if you set them to null.
|
|
142
159
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute
|
|
@@ -146,4 +163,14 @@ export declare class Element<StyleProps extends BaseStyleProps = any, ParsedStyl
|
|
|
146
163
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute
|
|
147
164
|
*/
|
|
148
165
|
setAttribute<Key extends keyof StyleProps>(attributeName: Key, value: StyleProps[Key], force?: boolean): void;
|
|
166
|
+
getAttributeNS(namespace: string, localName: string): string;
|
|
167
|
+
getAttributeNode(qualifiedName: string): Attr;
|
|
168
|
+
getAttributeNodeNS(namespace: string, localName: string): Attr;
|
|
169
|
+
hasAttributeNS(namespace: string, localName: string): boolean;
|
|
170
|
+
removeAttributeNS(namespace: string, localName: string): void;
|
|
171
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
172
|
+
setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
|
|
173
|
+
setAttributeNode(attr: Attr): Attr;
|
|
174
|
+
setAttributeNodeNS(attr: Attr): Attr;
|
|
175
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
149
176
|
}
|