forked from SuperMap/iClient-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSector.js
More file actions
86 lines (74 loc) · 2.94 KB
/
Sector.js
File metadata and controls
86 lines (74 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import {ShapeParameters} from './ShapeParameters';
/**
* @class ShapeParametersSector
* @aliasclass Feature.ShapeParameters.Sector
* @deprecatedclass SuperMap.Feature.ShapeParameters.Sector
* @category Visualization Theme
* @classdesc 扇形参数对象。
* @extends {ShapeParameters}
* @param {number} x - 圆心 X 坐标。
* @param {number} y - 圆心 Y 坐标。
* @param {number} r - 外圆半径。
* @param {number} startAngle - 起始角度。取值范围:[0, 360)。
* @param {number} endAngle - 结束角度。取值范围:(0, 360]。
* @param {number} [r0=0] - 内圆半径,指定后将出现内弧,同时扇边长度为'r - r0'。取值范围:[0, r)。
* @usage
*/
export class Sector extends ShapeParameters {
constructor(x, y, r, startAngle, endAngle, r0, clockWise) {
super(x, y, r, startAngle, endAngle, r0, clockWise);
/**
* @member {number} ShapeParametersSector.prototype.x
* @description 圆心 X 坐标。
*/
this.x = !isNaN(x) ? x : 0;
/**
* @member {number} ShapeParametersSector.prototype.Y
* @description 圆心 Y 坐标。
*/
this.y = !isNaN(y) ? y : 0;
/**
* @member {number} ShapeParametersSector.prototype.r
* @description 外圆半径。
*/
this.r = !isNaN(r) ? r : 0;
/**
* @member {number} ShapeParametersSector.prototype.startAngle
* @description 起始角度。取值范围:[0, 360),默认值:null。
*/
this.startAngle = !isNaN(startAngle) ? startAngle : 0;
/**
* @member {number} ShapeParametersSector.prototype.endAngle
* @description 结束角度。取值范围:(0, 360],默认值:null。
*/
this.endAngle = !isNaN(endAngle) ? endAngle : 0;
/**
* @member {number} [ShapeParametersSector.prototype.r0=0]
* @description 内圆半径,指定后将出现内弧,同时扇边长度为 r 减 r0。取值范围:[0, r)。
*/
this.r0 = !isNaN(r0) ? r0 : 0;
/**
* @member {number} [ShapeParametersSector.prototype.clockWise=false]
* @description 是否是顺时针。默认值:false。
*/
this.clockWise = clockWise;
this.CLASS_NAME = "SuperMap.Feature.ShapeParameters.Sector";
}
/**
* @function ShapeParametersSector.prototype.destroy
* @description 销毁对象。
*/
destroy() {
this.x = null;
this.y = null;
this.r = null;
this.startAngle = null;
this.endAngle = null;
this.r0 = null;
this.clockWise = null;
super.destroy();
}
}