Skip to content

Commit

Permalink
【fix】jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
songyumeng committed Sep 15, 2023
1 parent 0a8682a commit 07ad783
Show file tree
Hide file tree
Showing 35 changed files with 112 additions and 120 deletions.
2 changes: 1 addition & 1 deletion src/common/commontypes/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const DOTS_PER_INCH = 96;
const Util = {

/**
* @function Util.extend
* @memberOf CommonUtil
* @description 对象拷贝赋值。
* @param {Object} dest - 目标对象。
* @param {Object} arguments - 待拷贝的对象。
Expand Down
2 changes: 1 addition & 1 deletion src/common/commontypes/geometry/Polygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class Polygon extends Collection {
}

/**
* @function GeometryMultiPoint.prototype.getArea
* @function GeometryPolygon.prototype.getArea
* @description 获得区域面积,从区域的外部口径减去计此区域内部口径算所得的面积。
* @returns {number} 几何对象的面积。
*/
Expand Down
2 changes: 1 addition & 1 deletion src/common/iServer/CommonServiceBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class CommonServiceBase {
}

/**
* @function CommonServiceBase.prototype.request
* @function CommonServiceBase.prototype.request
* @description: 该方法用于向服务发送请求。
* @param {Object} options - 参数。
* @param {string} [options.method='GET'] - 请求方式,包括 "GET","POST","PUT","DELETE"。
Expand Down
6 changes: 3 additions & 3 deletions src/common/iServer/MapService.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ export class MapService extends CommonServiceBase {
}

/**
* @function destroy
* @function MapService.prototype.destroy
* @description 释放资源,将引用的资源属性置空。
*/
destroy() {
super.destroy();
}

/**
* @function MapService.prototype.processAsync
* @function MapService.prototype.processAsync
* @description 负责将客户端的设置的参数传递到服务端,与服务端完成异步通讯。
* @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。
* @returns {Promise} Promise 对象。
Expand All @@ -75,7 +75,7 @@ export class MapService extends CommonServiceBase {
}

/**
* @function MapService.prototype.transformResult
* @function MapService.prototype.transformResult
* @description 状态完成时转换结果。
* @param {Object} result - 服务器返回的结果对象。
* @param {Object} options - 请求参数。
Expand Down
8 changes: 4 additions & 4 deletions src/common/iServer/QueryServiceBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class QueryServiceBase extends CommonServiceBase {
}

/**
* @function QueryService.prototype.destroy
* @function QueryServiceBase.prototype.destroy
* @description 释放资源,将引用资源的属性置空。
*/
destroy() {
Expand All @@ -76,7 +76,7 @@ export class QueryServiceBase extends CommonServiceBase {
}

/**
* @function QueryService.prototype.processAsync
* @function QueryServiceBase.prototype.processAsync
* @description 负责将客户端的查询参数传递到服务端。
* @param {QueryParameters} params - 查询参数。
* @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。
Expand Down Expand Up @@ -111,7 +111,7 @@ export class QueryServiceBase extends CommonServiceBase {
}

/**
* @function QueryService.prototype.transformResult
* @function QueryServiceBase.prototype.transformResult
* @description 状态完成时转换结果。
* @param {Object} result - 服务器返回的结果对象。
* @param {Object} options - 请求参数。
Expand Down Expand Up @@ -145,7 +145,7 @@ export class QueryServiceBase extends CommonServiceBase {
}

/**
* @function QueryService.prototype.getQueryParameters
* @function QueryServiceBase.prototype.getQueryParameters
* @description 将 JSON 对象表示的查询参数转化为 QueryParameters 对象。
* @param {Object} params - JSON 字符串表示的查询参数。
* @returns {QueryParameters} 返回转化后的 QueryParameters 对象。
Expand Down
2 changes: 1 addition & 1 deletion src/common/overlay/KnowledgeGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ export class KnowledgeGraph {
}

/**
* @function KnowledgeGraph.prototype.showItem
* @function KnowledgeGraph.prototype.hideItem
* @description 隐藏指定元素。若 item 为节点,则相关边也会随之隐藏。而 hide() 则将只隐藏自身。
* @param {string|Object} item - 元素 ID 或元素实例。
* @param {boolean} [stack] -操作是否入 undo & redo 栈,当实例化 Graph 时设置 enableStack 为 true 时,默认情况下会自动入栈,入栈以后,就支持 undo & redo 操作,如果不需要,则设置该参数为 false 即可。
Expand Down
12 changes: 6 additions & 6 deletions src/common/overlay/feature/ShapeFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class ShapeFactory {


/**
* @function FeatureShapeFactory.prototype.destroy
* @function FeatureShapeFactory.prototype.destroy
* @description 销毁图形工厂类对象。
*/
destroy() {
Expand All @@ -61,7 +61,7 @@ export class ShapeFactory {


/**
* @function FeatureShapeFactory.prototype.createShape
* @function FeatureShapeFactory.prototype.createShape
* @description 创建一个图形。具体图形由 shapeParameters 决定。
* @param {Object} shapeParameters - 图形参数对象,<{@link ShapeParameters}> 子类对象。
* 此参数可选,如果使用此参数(不为 null),shapeParameters 属性值将被修改为参数的值,然后再使用 shapeParameters 属性值创建图形;
Expand Down Expand Up @@ -255,7 +255,7 @@ export class ShapeFactory {


/**
* @function FeatureShapeFactory.prototype.transformStyle
* @function FeatureShapeFactory.prototype.transformStyle
* @description 将用户 feature.style (类 Svg style 标准) 的样式,转换为 levelRenderer 的样式标准(类 CSS-Canvas 样式)
* @param {Object} style - 用户 style。
* @returns {Object} 符合 levelRenderer 的 style。
Expand Down Expand Up @@ -368,7 +368,7 @@ export class ShapeFactory {
}

/**
* @function FeatureShapeFactory.prototype.Background
* @function FeatureShapeFactory.prototype.Background
* @description 创建一个矩形背景框图形对象。
* @param {FeatureShapeFactory} shapeFactory - 图形工厂对象。
* @param {Array.<number>} box - 框区域,长度为 4 的一维数组,像素坐标,[left, bottom, right, top]。
Expand Down Expand Up @@ -406,7 +406,7 @@ export class ShapeFactory {
}

/**
* @function FeatureShapeFactory.prototype.GraphAxis
* @function FeatureShapeFactory.prototype.GraphAxis
* @description 创建一个统计图表坐标轴图形对象组。
* @param {FeatureShapeFactory} shapeFactory - 图形工厂对象。
* @param {Array.<number>} dataViewBox - 统计图表模型的数据视图框,长度为 4 的一维数组,像素坐标,[left, bottom, right, top]。
Expand Down Expand Up @@ -751,7 +751,7 @@ export class ShapeFactory {
}

/**
* @function FeatureShapeFactory.prototype.ShapeStyleTool
* @function FeatureShapeFactory.prototype.ShapeStyleTool
* @description 一个图形 style 处理工具。此工具将指定的默认 style,通用 style,按 styleGroup 取得的 style 和按数据值 value 范围取得的 style 进行合并,得到图形最终的 style。
* @param {Object} defaultStyle - 默认style,此样式对象可设属性根据图形类型参考 <{@link ShapeParameters}> 子类对象的 style 属性。
* @param {Object} style - 图形对象基础 style,此参数控制图形的基础样式,可设属性根据图形类型参考 <{@link ShapeParameters}> 子类对象的 style 属性。优先级低于 styleGroup,styleByCodomain。
Expand Down
2 changes: 1 addition & 1 deletion src/common/overlay/knowledge-graph/G6Render.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class G6Render {
}

/**
* @function KnowledgeGraph.prototype.changeSize
* @function G6Render.prototype.changeSize
* @description 当源数据中现有节点/边 的数据项发生配置的变更时,根据新数据刷新视图。
* @param {number} width - 宽度。
* @param {number} height - 高度。
Expand Down
2 changes: 1 addition & 1 deletion src/common/thirdparty/ai/BinaryClassification.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class BinaryClassification extends MachineLearningBase {
super(options);
}
/**
* @function BinaryClassification.prototype.handleResult
* @function BinaryClassification.prototype.handleResult
* @description 对预测数据进行处理
* @param {Object} prediction - 模型预测后的张量。
* @returns {Object} 处理返回的数据
Expand Down
2 changes: 1 addition & 1 deletion src/common/thirdparty/ai/LandcoverClassification.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class LandcoverClassification extends MachineLearningBase {
super(options);
}
/**
* @function ObjectDetection.prototype.handleResult
* @function ObjectDetection.prototype.handleResult
* @description 对模型进行预测
* @param {Object} prediction - 模型预测后的张量。
* @returns {Object} 处理返回的数据
Expand Down
10 changes: 5 additions & 5 deletions src/common/thirdparty/ai/MachineLearningBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class MachineLearningModelBase {
}

/**
* @function MachineLearningBase.prototype._loadModel
* @function MachineLearningBase.prototype._loadModel
* @description 加载模型
* @param {string} modelUrl - 模型地址。
* @returns {Promise.<tf.GraphModel>}
Expand All @@ -49,14 +49,14 @@ export default class MachineLearningModelBase {
}

/**
* @function MachineLearningBase.prototype.handleResult
* @function MachineLearningBase.prototype.handleResult
* @description 对预测数据进行处理
*/

handleResult() {}

/**
* @function MachineLearningBase.prototype.handleInputParams
* @function MachineLearningBase.prototype.handleInputParams
* @description 处理输入张量
* @param {PixelData|ImageData|HTMLImageElement|HTMLCanvasElement| HTMLVideoElement|ImageBitmap} image - 图片对象。
* @param {number} width - 图片宽度。
Expand All @@ -70,7 +70,7 @@ export default class MachineLearningModelBase {
}

/**
* @function MachineLearningBase.prototype.predict
* @function MachineLearningBase.prototype.predict
* @description 对模型进行预测
* @returns {Object}
*/
Expand All @@ -88,7 +88,7 @@ export default class MachineLearningModelBase {
}

/**
* @function MachineLearningBase.prototype.dispose
* @function MachineLearningBase.prototype.dispose
* @description 释放内存
*/

Expand Down
6 changes: 3 additions & 3 deletions src/common/thirdparty/ai/ObjectDetection.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ObjectDetection extends MachineLearningBase {
super(options);
}
/**
* @function ObjectDetection.prototype.predict
* @function ObjectDetection.prototype.predict
* @description 对模型进行预测
* @returns {Object} 预测后的数据
*/
Expand All @@ -34,7 +34,7 @@ export class ObjectDetection extends MachineLearningBase {
}

/**
* @function ObjectDetection.prototype.handleResult
* @function ObjectDetection.prototype.handleResult
* @description 对预测数据进行处理
* @param {Object} result - 预测后的数据。
* @returns {Object} 处理返回的数据
Expand Down Expand Up @@ -190,7 +190,7 @@ export class ObjectDetection extends MachineLearningBase {
}

/**
* @function ObjectDetection.prototype.handleInputParams
* @function ObjectDetection.prototype.handleInputParams
* @description 处理输入张量
* @param {PixelData|ImageData|HTMLImageElement|HTMLCanvasElement| HTMLVideoElement|ImageBitmap} image - 图片对象。
* @param {number} width - 图片宽度。
Expand Down
2 changes: 1 addition & 1 deletion src/common/thirdparty/ai/WebMachineLearning.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

export class WebMachineLearning {
/**
* @function WebMachineLearning.prototype.execute
* @function WebMachineLearning.prototype.execute
* @description 执行预测
* @param {BinaryClassification|LandcoverClassification|ObjectDetection} instance - 模型实例。
* @returns {Object} 返回处理的数据
Expand Down
Loading

0 comments on commit 07ad783

Please sign in to comment.