@@ -7,17 +7,17 @@ ol.supermap.control = ol.supermap.control || {};
77/**
88 * @class ol.supermap.control.ChangeTileVersion
99 * @category Control
10- * @classdesc 版本切换控件(目前仅支持IE10及以上)暂时不支持自定义位置
10+ * @classdesc 版本切换控件(目前仅支持IE10及以上)暂时不支持自定义位置。
1111 * @extends {ol.control.Control }
12- * @param {options } options -参数。<br>
13- * @param {string } options.title - 提示信息。<br>
14- * @param {string } options.tooltip - 提示显示位置 top | right | bottom | left。<br>
15- * @param {boolean } options.collapsed - 是否折叠。<br>
16- * @param {string } options.lastText - 上一个版本的按钮布局。<br>
17- * @param {string } options.nextText - 下一个版本的按钮布局。<br>
18- * @param {string } options.ico - 控件显示的logo。<br>
19- * @param {string } options.orientation - 方向horizontal|vertical。<br>
20- * @param {boolean } options.switch - 是否显示上/下一个版本切换控件
12+ * @param {options } options -参数。
13+ * @param {string } [ options.title='switch tile version'] - 提示信息。
14+ * @param {string } [ options.tooltip='top'] - 提示显示位置 top | right | bottom | left。
15+ * @param {boolean } [ options.collapsed=true] - 是否折叠。
16+ * @param {string } [ options.lastText='-'] - 上一个版本的按钮布局。
17+ * @param {string } [ options.nextText='+'] - 下一个版本的按钮布局。
18+ * @param {string } [ options.ico='V'] - 控件显示的logo。
19+ * @param {string } [ options.orientation='horizontal'] - 方向horizontal|vertical。
20+ * @param {boolean } [ options.switch=true] - 是否显示上/下一个版本切换控件。
2121 * @example
2222 * var control = new ol.supermap.control.ChangeTileVersion({
2323 * layer: baseLayer,
@@ -71,7 +71,7 @@ export class ChangeTileVersion extends ol.control.Control {
7171
7272 /**
7373 * @function ol.supermap.control.ChangeTileVersion.prototype.initLayout
74- * @description 初始化
74+ * @description 初始化。
7575 */
7676 function initLayout ( ) {
7777 var className = 'ol-control-ctv' ;
@@ -145,7 +145,7 @@ export class ChangeTileVersion extends ol.control.Control {
145145
146146 /**
147147 * @function ol.supermap.control.ChangeTileVersion.prototype.addDomEvent
148- * @description 为元素添加事件
148+ * @description 为元素添加事件。
149149 */
150150 addDomEvent ( this . _container , "click" , function ( e ) {
151151 e . preventDefault ( ) ;
@@ -169,10 +169,10 @@ export class ChangeTileVersion extends ol.control.Control {
169169
170170 /**
171171 * @function ol.supermap.control.ChangeTileVersion.prototype.createElement
172- * @description 新建元素
173- * @param {string } tagName - 标签名
174- * @param {string } className - 类名
175- * @param {Object } container - 容器
172+ * @description 新建元素。
173+ * @param {string } tagName - 标签名。
174+ * @param {string } className - 类名。
175+ * @param {Object } container - 容器。
176176 * @returns {object|Element } 元素
177177 */
178178 function createElement ( tagName , className , container ) {
@@ -187,11 +187,11 @@ export class ChangeTileVersion extends ol.control.Control {
187187
188188 /**
189189 * @function ol.supermap.control.ChangeTileVersion.prototype.addDomEvent
190- * @description 为元素添加事件
191- * @param {Object } obj - 事件对象集
192- * @param {string } type - 事件类型
193- * @param {Object } fn -容器
194- * @param {Object } context -当前环境
190+ * @description 为元素添加事件。
191+ * @param {Object } obj - 事件对象集。
192+ * @param {string } type - 事件类型。
193+ * @param {Object } fn -容器。
194+ * @param {Object } context -当前环境。
195195 * @returns {addDomEvent } 添加的事件
196196 */
197197 function addDomEvent ( obj , type , fn , context ) {
@@ -256,8 +256,8 @@ export class ChangeTileVersion extends ol.control.Control {
256256
257257 /**
258258 * @function ol.supermap.control.ChangeTileVersion.prototype.setContent
259- * @description 设置版本相关信息
260- * @param {Object } version - 版本信息
259+ * @description 设置版本相关信息。
260+ * @param {Object } version - 版本信息。
261261 */
262262 setContent ( version ) {
263263 var content = version || { } ;
@@ -267,7 +267,7 @@ export class ChangeTileVersion extends ol.control.Control {
267267 /**
268268 * @function ol.supermap.control.ChangeTileVersion.prototype.setVersionName
269269 * @description 设置版本号
270- * @param {string } content -版本内容
270+ * @param {string } content -版本内容。
271271 */
272272 setVersionName ( content ) {
273273 var value = content ;
@@ -280,8 +280,8 @@ export class ChangeTileVersion extends ol.control.Control {
280280
281281 /**
282282 * @function ol.supermap.control.ChangeTileVersion.prototype.setToolTip
283- * @description 设置提示信息
284- * @param {string } tooltip - 工具提示
283+ * @description 设置提示信息。
284+ * @param {string } tooltip - 工具提示。
285285 * @returns {this } this
286286 */
287287 setToolTip ( tooltip ) {
@@ -291,8 +291,8 @@ export class ChangeTileVersion extends ol.control.Control {
291291
292292 /**
293293 * @function ol.supermap.control.ChangeTileVersion.prototype.updateLength
294- * @description 更新进度条长度
295- * @param {number } length - 进度条长度
294+ * @description 更新进度条长度。
295+ * @param {number } length - 进度条长度。
296296 */
297297 updateLength ( length ) {
298298 if ( length > 0 ) {
@@ -304,8 +304,8 @@ export class ChangeTileVersion extends ol.control.Control {
304304
305305 /**
306306 * @function ol.supermap.control.ChangeTileVersion.prototype.setLayer
307- * @description 绑定图层
308- * @param {Object } layer - 图层
307+ * @description 绑定图层。
308+ * @param {Object } layer - 图层。
309309 */
310310 setLayer ( layer ) {
311311 if ( layer ) {
@@ -326,8 +326,8 @@ export class ChangeTileVersion extends ol.control.Control {
326326
327327 /**
328328 * @function ol.supermap.control.ChangeTileVersion.prototype.update
329- * @description 更新缓存切片集及进度条长度
330- * @param {Object } tileVersions - 待更新的切片版本
329+ * @description 更新缓存切片集及进度条长度。
330+ * @param {Object } tileVersions - 待更新的切片版本。
331331 */
332332 update ( tileVersions ) {
333333 this . tileVersions = tileVersions ;
@@ -336,7 +336,7 @@ export class ChangeTileVersion extends ol.control.Control {
336336
337337 /**
338338 * @function ol.supermap.control.ChangeTileVersion.prototype.getTileSetsInfo
339- * @description 请求获取切片集信息
339+ * @description 请求获取切片集信息。
340340 */
341341 getTileSetsInfo ( ) {
342342 var me = this ;
@@ -349,15 +349,15 @@ export class ChangeTileVersion extends ol.control.Control {
349349
350350 /**
351351 * @function ol.supermap.control.ChangeTileVersion.prototype.removeLayer
352- * @description 移除绑定的地图图层
352+ * @description 移除绑定的地图图层。
353353 */
354354 removeLayer ( ) {
355355 this . options . layer = null ;
356356 }
357357
358358 /**
359359 * @function ol.supermap.control.ChangeTileVersion.prototype.nextTilesVersion
360- * @description 下一个版本,第一次不进行加减,是无版本的状态
360+ * @description 下一个版本,第一次不进行加减,是无版本的状态。
361361 * @returns {this } this
362362 */
363363 nextTilesVersion ( ) {
@@ -376,7 +376,7 @@ export class ChangeTileVersion extends ol.control.Control {
376376
377377 /**
378378 * @function ol.supermap.control.ChangeTileVersion.prototype.lastTilesVersion
379- * @description 获取上一个版本信息
379+ * @description 获取上一个版本信息。
380380 * @returns {this } this
381381 */
382382 lastTilesVersion ( ) {
@@ -390,8 +390,8 @@ export class ChangeTileVersion extends ol.control.Control {
390390
391391 /**
392392 * @function ol.supermap.control.ChangeTileVersion.prototype.tilesVersion
393- * @description 根据指定版本号请求版本
394- * @param {Object } version - 版本信息
393+ * @description 根据指定版本号请求版本。
394+ * @param {Object } version - 版本信息。
395395 */
396396 tilesVersion ( version ) {
397397 var layer = this . options . layer ,
@@ -408,15 +408,15 @@ export class ChangeTileVersion extends ol.control.Control {
408408
409409 /**
410410 * @function ol.supermap.control.ChangeTileVersion.prototype.getValue
411- * @description 获取进度条的值。注:(进度条的值并不是版本号)
411+ * @description 获取进度条的值。注:(进度条的值并不是版本号)。
412412 */
413413 getValue ( ) {
414414 return this . slider . value ;
415415 }
416416
417417 /**
418418 * @function ol.supermap.control.ChangeTileVersion.prototype.getVersion
419- * @description 获取当前进度条值对应的版本号
419+ * @description 获取当前进度条值对应的版本号。
420420 */
421421 getVersion ( ) {
422422 var version = this . tileVersions [ this . getValue ( ) ] ;
0 commit comments