Skip to content

Commit 3f813ed

Browse files
committed
【update】common 统一命名优化; review by luox
1 parent 51c805a commit 3f813ed

83 files changed

Lines changed: 24983 additions & 24899 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/common/components/chart/ChartModel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ export class ChartModel {
566566
message: Lang.i18n('msg_getdatafailed')
567567
};
568568
/**
569-
* @event ChartView#getdatafailed
569+
* @event ChartModel#getdatafailed
570570
* @description 监听到获取数据失败事件后触发
571571
* @property {Object} error - 事件对象。
572572
*/

src/common/components/chart/ChartView.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import {
1010
} from "../messagebox/MessageBox";
1111

1212
/**
13-
* @class ChartView
13+
* @class Chart
1414
* @deprecatedclass SuperMap.Components.Chart
1515
* @classdesc 图表组件
1616
* @version 9.1.2
1717
* @param {string} domID - 图表dom元素ID。
1818
* @param {Object} options - 可选参数。
1919
* @param {string} options.type - 图表类型。
20-
* @param {ChartView.Datasets} options.datasets - 数据来源
20+
* @param {Chart.Datasets} options.datasets - 数据来源
2121
* @param {Array.<Object>} options.chartOptions - 图表可选参数。
2222
* @param {Array.<Object>} options.chartOptions.xAxis - 图表X轴。
2323
* @param {string} options.chartOptions.xAxis.field - 图表X轴字段名。
@@ -29,7 +29,7 @@ import {
2929
* @usage
3030
*/
3131
/**
32-
* @typedef {Object} ChartView.Datasets - 数据来源
32+
* @typedef {Object} Chart.Datasets - 数据来源
3333
* @property {string} [type = 'iServer'] - 服务类型 iServer, iPortal。
3434
* @property {string} url - 服务url地址。
3535
* @property {boolean} [withCredentials = false] - 设置请求是否带cookie
@@ -50,7 +50,7 @@ export class ChartView {
5050
}
5151

5252
/**
53-
* @function ChartView.prototype.onAdd
53+
* @function Chart.prototype.onAdd
5454
* @description 创建图表之后成功回调
5555
* @param {function} addChart - 回调函数
5656
*/
@@ -59,7 +59,7 @@ export class ChartView {
5959
}
6060

6161
/**
62-
* @function ChartView.prototype._fillDataToView
62+
* @function Chart.prototype._fillDataToView
6363
* @description 填充数据到 view。
6464
* @private
6565
*/
@@ -75,23 +75,23 @@ export class ChartView {
7575
}
7676

7777
/**
78-
* @function ChartView.prototype.getStyle
78+
* @function Chart.prototype.getStyle
7979
* @description 获取图表样式。
8080
*/
8181
getStyle() {
8282
return this.viewModel.getStyle()
8383
}
8484

8585
/**
86-
* @function ChartView.prototype.getFeatures
86+
* @function Chart.prototype.getFeatures
8787
* @description 获取地图服务,数据服务请求返回的数据。
8888
*/
8989
getFeatures() {
9090
return this.viewModel.getFeatures();
9191
}
9292

9393
/**
94-
* @function ChartView.prototype.setStyle
94+
* @function Chart.prototype.setStyle
9595
* @description 设置图表样式。
9696
* @param {Object} style - 图表样式 参考Echarts-options样式设置
9797
*/
@@ -101,7 +101,7 @@ export class ChartView {
101101
}
102102

103103
/**
104-
* @function ChartView.prototype.changeType
104+
* @function Chart.prototype.changeType
105105
* @description 改变图表类型
106106
* @param {string} type - 图表类型
107107
*/
@@ -114,9 +114,9 @@ export class ChartView {
114114
}
115115

116116
/**
117-
* @function ChartView.prototype.updateData
117+
* @function Chart.prototype.updateData
118118
* @description 更新图表数据
119-
* @param {ChartView.Datasets} datasets - 数据来源
119+
* @param {Chart.Datasets} datasets - 数据来源
120120
* @param {Object} chartOption - X,Y轴信息
121121
*/
122122
updateData(datasets, chartOption) {
@@ -130,7 +130,7 @@ export class ChartView {
130130
}
131131

132132
/**
133-
* @function ChartView.prototype._createChart
133+
* @function Chart.prototype._createChart
134134
* @description 创建图表
135135
* @private
136136
* @param {Object} data - 图表数据
@@ -150,7 +150,7 @@ export class ChartView {
150150
}
151151

152152
/**
153-
* @function ChartView.prototype._updateChart
153+
* @function Chart.prototype._updateChart
154154
* @description 更新图表
155155
* @private
156156
* @param {Object} options - 图表参数

src/common/components/chart/ChartViewModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Events } from '../../commontypes/Events';
1212
* @version 10.0.0
1313
* @param {Object} options - 可选参数。
1414
* @param {string} options.type - 图表类型。
15-
* @param {ChartView.Datasets} options.datasets - 数据来源。
15+
* @param {Chart.Datasets} options.datasets - 数据来源。
1616
* @param {Array.<Object>} options.chartOptions - 图表可选参数。
1717
* @param {Array.<Object>} options.chartOptions.xAxis - 图表X轴。
1818
* @param {string} options.chartOptions.xAxis.field - 图表X轴字段名。
@@ -256,7 +256,7 @@ export class ChartViewModel {
256256
/**
257257
* @function ChartViewModel.prototype.updateData
258258
* @description 改变图表类型
259-
* @param {ChartView.Datasets} datasets - 数据来源
259+
* @param {Chart.Datasets} datasets - 数据来源
260260
* @param {function} success 成功回调函数
261261
*/
262262
updateData(datasets, chartOption, success) {

src/common/iServer/WebPrintingJobContent.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import { Util } from '../commontypes/Util';
55

66
/**
7-
* @class SuperMap.WebPrintingJobContent
7+
* @class WebPrintingJobContent
8+
* @deprecatedclass SuperMap.WebPrintingJobContent
89
* @classdesc Web 打印内容参数类。
910
* @version 10.1.0
1011
* @category iServer WebPrintingJob
@@ -13,26 +14,27 @@ import { Util } from '../commontypes/Util';
1314
* @param {string} [option.url] - 待打印的 SuperMap iPortal WebMap 的 url 地址。例如:http://supermapiportal:8190/iportal/web/maps/{mapid}/map.rjson
1415
* @param {string} [option.token] - 如果待打印的是 SuperMap iPortal 用户私有的 WebMap,需要提供 SuperMap iPortal 用户的 token。
1516
* @param {WebMapSummaryObject} [option.value] - 传递的是一个符合 SuperMap WebMap 规范的 WebMap 的 JSON 表达,也可以是一个完整的 SuperMap iPortal 数据上图制作的 WebMap 的 json 表达。如果已填了 url 参数,此参数可不传
17+
* @usage
1618
*/
1719
export class WebPrintingJobContent {
1820
constructor(option) {
1921
/**
20-
* @member {string} SuperMap.WebPrintingJobContent.prototype.type
22+
* @member {string} WebPrintingJobContent.prototype.type
2123
* @description Web 打印内容支持的类型。
2224
*/
2325
this.type = null;
2426
/**
25-
* @member {string} [SuperMap.WebPrintingJobContent.prototype.url]
27+
* @member {string} [WebPrintingJobContent.prototype.url]
2628
* @description 待打印的 SuperMap iPortal WebMap 的 url 地址。
2729
*/
2830
this.url = null;
2931
/**
30-
* @member {string} [SuperMap.WebPrintingJobContent.prototype.token]
32+
* @member {string} [WebPrintingJobContent.prototype.token]
3133
* @description 如果待打印的是 SuperMap iPortal 用户私有的 WebMap,需要提供 SuperMap iPortal 用户的 token。
3234
*/
3335
this.token = null;
3436
/**
35-
* @member {WebMapSummaryObject} [SuperMap.WebPrintingJobContent.prototype.value]
37+
* @member {WebMapSummaryObject} [WebPrintingJobContent.prototype.value]
3638
* @description 传递的是一个符合 SuperMap WebMap 规范的 WebMap 的 JSON 表达,也可以是一个完整的 SuperMap iPortal 数据上图制作的 WebMap 的 json 表达。
3739
*/
3840
this.value = null;
@@ -42,7 +44,7 @@ export class WebPrintingJobContent {
4244
}
4345

4446
/**
45-
* @function SuperMap.WebPrintingJobContent.prototype.destroy
47+
* @function WebPrintingJobContent.prototype.destroy
4648
* @description 释放资源,将引用资源的属性置空。
4749
*/
4850
destroy() {
@@ -53,8 +55,8 @@ export class WebPrintingJobContent {
5355
}
5456

5557
/**
56-
* @function SuperMap.WebPrintingJobContent.prototype.toJSON
57-
* @descriptionSuperMap.WebPrintingJobContent 对象转化为 JSON 字符串。
58+
* @function WebPrintingJobContent.prototype.toJSON
59+
* @description 将 WebPrintingJobContent 对象转化为 JSON 字符串。
5860
* @returns {string} 返回转换后的 JSON 字符串。
5961
*/
6062
toJSON() {

src/common/iServer/WebPrintingJobCustomItems.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,31 @@
44
import { Util } from '../commontypes/Util';
55

66
/**
7-
* @class SuperMap.WebPrintingJobCustomItems
7+
* @class WebPrintingJobCustomItems
8+
* @deprecatedclass SuperMap.WebPrintingJobCustomItems
89
* @classdesc Web 打印图例元素参数类。
910
* @version 10.1.0
1011
* @category iServer WebPrintingJob
1112
* @param {Object} option - 初始化参数。
1213
* @param {string} option.name - 图例元素的名称。
1314
* @param {string} [option.picAsUrl] - 图例元素 Base64 格式图片。
1415
* @param {string} [option.picAsBase64] - 图例元素图片的获取地址。
16+
* @usage
1517
*/
1618
export class WebPrintingJobCustomItems {
1719
constructor(option) {
1820
/**
19-
* @member {string} SuperMap.WebPrintingJobCustomItems.prototype.name
21+
* @member {string} WebPrintingJobCustomItems.prototype.name
2022
* @description 图例元素的名称。
2123
*/
2224
this.name = null;
2325
/**
24-
* @member {string} [SuperMap.WebPrintingJobCustomItems.prototype.picAsUrl]
26+
* @member {string} [WebPrintingJobCustomItems.prototype.picAsUrl]
2527
* @description 图例元素 Base64 格式图片。
2628
*/
2729
this.picAsUrl = null;
2830
/**
29-
* @member {string} [SuperMap.WebPrintingJobCustomItems.prototype.picAsBase64]
31+
* @member {string} [WebPrintingJobCustomItems.prototype.picAsBase64]
3032
* @description 图例元素图片的获取地址。
3133
*/
3234
this.picAsBase64 = null;
@@ -36,7 +38,7 @@ export class WebPrintingJobCustomItems {
3638
}
3739

3840
/**
39-
* @function SuperMap.WebPrintingJobCustomItems.prototype.destroy
41+
* @function WebPrintingJobCustomItems.prototype.destroy
4042
* @description 释放资源,将引用资源的属性置空。
4143
*/
4244
destroy() {
@@ -47,8 +49,8 @@ export class WebPrintingJobCustomItems {
4749
}
4850

4951
/**
50-
* @function SuperMap.WebPrintingJobCustomItems.prototype.toJSON
51-
* @descriptionSuperMap.WebPrintingJobCustomItems 对象转化为 JSON 字符串。
52+
* @function WebPrintingJobCustomItems.prototype.toJSON
53+
* @description 将 WebPrintingJobCustomItems 对象转化为 JSON 字符串。
5254
* @returns {string} 返回转换后的 JSON 字符串。
5355
*/
5456
toJSON() {

src/common/iServer/WebPrintingJobExportOptions.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,43 @@
44
import { Util } from '../commontypes/Util';
55

66
/**
7-
* @class SuperMap.WebPrintingJobExportOptions
7+
* @class WebPrintingJobExportOptions
8+
* @deprecatedclass SuperMap.WebPrintingJobExportOptions
89
* @classdesc Web 打印的输出参数类。
910
* @version 10.1.0
1011
* @category iServer WebPrintingJob
1112
* @param {Object} option - 初始化参数。
12-
* @param {SuperMap.WebExportFormatType} option.format - Web 打印输出的格式,目前支持:PNG、PDF。
13+
* @param {WebExportFormatType} option.format - Web 打印输出的格式,目前支持:PNG、PDF。
1314
* @param {number} [option.dpi=96] - Web 打印输出的分辨率,单位为每英寸点数。默认值为 96 dpi。
1415
* @param {number} [option.scale] - Web 打印输出的地图比例尺。
1516
* @param {number} [option.rotation] - Web 打印输出的地图角度。
16-
* @param {SuperMap.Geometry.Point|L.Point|L.LatLng|ol.geom.Point|mapboxgl.LngLat|mapboxgl.Point|Array.<number>} [option.center] - Web 打印输出的地图中心点。
17+
* @param {GeometryPoint|L.Point|L.LatLng|ol.geom.Point|mapboxgl.LngLat|mapboxgl.Point|Array.<number>} [option.center] - Web 打印输出的地图中心点。
18+
* @usage
1719
*/
1820
export class WebPrintingJobExportOptions {
1921
constructor(option) {
2022
/**
21-
* @member {SuperMap.WebExportFormatType} SuperMap.WebPrintingJobExportOptions.prototype.format
23+
* @member {WebExportFormatType} WebPrintingJobExportOptions.prototype.format
2224
* @description Web 打印输出的格式。
2325
*/
2426
this.format = null;
2527
/**
26-
* @member {number} [SuperMap.WebPrintingJobExportOptions.prototype.dpi=96]
28+
* @member {number} [WebPrintingJobExportOptions.prototype.dpi=96]
2729
* @description Web 打印输出的分辨率,单位为每英寸点数。
2830
*/
2931
this.dpi = 96;
3032
/**
31-
* @member {number} [SuperMap.WebPrintingJobExportOptions.prototype.scale]
33+
* @member {number} [WebPrintingJobExportOptions.prototype.scale]
3234
* @description Web 打印输出的地图比例尺。
3335
*/
3436
this.scale = null;
3537
/**
36-
* @member {number} [SuperMap.WebPrintingJobExportOptions.prototype.rotation]
38+
* @member {number} [WebPrintingJobExportOptions.prototype.rotation]
3739
* @description Web 打印输出的地图角度。
3840
*/
3941
this.rotation = null;
4042
/**
41-
* @member {Array.<(SuperMap.Geometry.Point|L.Point|L.LatLng|ol.geom.Point)>} [SuperMap.WebPrintingJobExportOptions.prototype.center]
43+
* @member {Array.<(GeometryPoint|L.Point|L.LatLng|ol.geom.Point)>} [WebPrintingJobExportOptions.prototype.center]
4244
* @description Web 打印输出的地图中心点。
4345
*/
4446
this.center = null;
@@ -48,7 +50,7 @@ export class WebPrintingJobExportOptions {
4850
}
4951

5052
/**
51-
* @function SuperMap.WebPrintingJobExportOptions.prototype.destroy
53+
* @function WebPrintingJobExportOptions.prototype.destroy
5254
* @description 释放资源,将引用资源的属性置空。
5355
*/
5456
destroy() {
@@ -61,8 +63,8 @@ export class WebPrintingJobExportOptions {
6163
}
6264

6365
/**
64-
* @function SuperMap.WebPrintingJobExportOptions.prototype.toJSON
65-
* @descriptionSuperMap.WebPrintingJobExportOptions 对象转化为 JSON 字符串。
66+
* @function WebPrintingJobExportOptions.prototype.toJSON
67+
* @description 将 WebPrintingJobExportOptions 对象转化为 JSON 字符串。
6668
* @returns {string} 返回转换后的 JSON 字符串。
6769
*/
6870
toJSON() {

src/common/iServer/WebPrintingJobImage.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,25 @@
44
import { Util } from '../commontypes/Util';
55

66
/**
7-
* @class SuperMap.WebPrintingJobImage
7+
* @class WebPrintingJobImage
8+
* @deprecatedclass SuperMap.WebPrintingJobImage
89
* @classdesc 表达小地图的静态图片参数类。
910
* @version 10.1.0
1011
* @category iServer WebPrintingJob
1112
* @param {Object} option - 初始化参数。
1213
* @param {string} [option.picAsUrl] - 小地图的图片 url 地址。
1314
* @param {string} [option.picAsBase64] - 小地图的base64位图片信息。
15+
* @usage
1416
*/
1517
export class WebPrintingJobImage {
1618
constructor(option) {
1719
/**
18-
* @member {string} [SuperMap.WebPrintingJobImage.prototype.picAsUrl]
20+
* @member {string} [WebPrintingJobImage.prototype.picAsUrl]
1921
* @description 小地图的图片 url 地址。
2022
*/
2123
this.picAsUrl = null;
2224
/**
23-
* @member {string} [SuperMap.WebPrintingJobImage.prototype.picAsBase64]
25+
* @member {string} [WebPrintingJobImage.prototype.picAsBase64]
2426
* @description 小地图的base64位图片信息。
2527
*/
2628
this.picAsBase64 = null;
@@ -30,7 +32,7 @@ export class WebPrintingJobImage {
3032
}
3133

3234
/**
33-
* @function SuperMap.WebPrintingJobImage.prototype.destroy
35+
* @function WebPrintingJobImage.prototype.destroy
3436
* @description 释放资源,将引用资源的属性置空。
3537
*/
3638
destroy() {
@@ -39,8 +41,8 @@ export class WebPrintingJobImage {
3941
}
4042

4143
/**
42-
* @function SuperMap.WebPrintingJobImage.prototype.toJSON
43-
* @descriptionSuperMap.WebPrintingJobImage 对象转化为 JSON 字符串。
44+
* @function WebPrintingJobImage.prototype.toJSON
45+
* @description 将 WebPrintingJobImage 对象转化为 JSON 字符串。
4446
* @returns {string} 返回转换后的 JSON 字符串。
4547
*/
4648
toJSON() {

0 commit comments

Comments
 (0)