@@ -4,7 +4,7 @@ import {MapService} from "../services/MapService";
44
55/**
66 * @class L.supermap.control.changeTileVersion
7- * @classdesc 版本切换控件,支持IE10及以上
7+ * @classdesc 版本切换控件,支持 IE10 及以上。
88 * @category Control
99 * @extends {L.Control }
1010 * @example
@@ -13,17 +13,17 @@ import {MapService} from "../services/MapService";
1313 * position: "topleft",
1414 * orientation: "horizontal"
1515 * }).addTo(map);
16- * @param {Object } options - logo控件配置项 。
16+ * @param {Object } options - logo 控件配置项 。
1717 * @param {L.Layer } options.layer - 绑定的底图图层。
18- * @param {string } [options.position='topleft'] - 控件位置 继承自leaflet control。
19- * @param {string } options.title - 鼠标滑过时提示。
20- * @param {string } options.tooltip - tooltip提示显示位置 top | right | bottom | left。
21- * @param {boolean } options.collapsed - 是否折叠。
22- * @param {string } options.nextText - 下一个版本的按钮布局。
23- * @param {string } options.lastText - 上一个版本的按钮布局。
24- * @param {string } options.ico - 控件显示的logo 。
25- * @param {string } options.orientation - 方向horizontal |vertical。
26- * @param {boolean } options.switch - 是否显示上/下一个版本切换控件。
18+ * @param {string } [options.position='topleft'] - 控件位置继承自 leaflet control。
19+ * @param {string } [ options.title='switch tile version'] - 鼠标滑过时提示。
20+ * @param {string } [ options.tooltip='top'] - tooltip 提示显示位置 top | right | bottom | left。
21+ * @param {boolean } [ options.collapsed=true] - 是否折叠。
22+ * @param {string } [ options.nextText='+'] - 下一个版本的按钮布局。
23+ * @param {string } [ options.lastText='-'] - 上一个版本的按钮布局。
24+ * @param {string } [ options.ico='v'] - 控件显示的 logo 。
25+ * @param {string } [ options.orientation='horizontal'] - 方向 horizontal |vertical。
26+ * @param {boolean } [ options.switch=true] - 是否显示上/下一个版本切换控件。
2727 */
2828export var ChangeTileVersion = L . Control . extend ( {
2929
@@ -53,7 +53,7 @@ export var ChangeTileVersion = L.Control.extend({
5353 /**
5454 * @private
5555 * @function L.supermap.control.changeTileVersion.prototype.onAdd
56- * @description 添加控件
56+ * @description 添加控件。
5757 */
5858 onAdd : function ( ) {
5959 if ( this . options . orientation !== 'vertical' ) {
@@ -68,8 +68,8 @@ export var ChangeTileVersion = L.Control.extend({
6868
6969 /**
7070 * @function L.supermap.control.changeTileVersion.prototype.setContent
71- * @description 设置版本相关信息
72- * @param {Object } version - 版本信息
71+ * @description 设置版本相关信息。
72+ * @param {Object } version - 版本信息。
7373 */
7474 setContent : function ( version ) {
7575 var content = L . Util . extend ( { } , version ) ;
@@ -78,9 +78,9 @@ export var ChangeTileVersion = L.Control.extend({
7878
7979 /**
8080 * @function L.supermap.control.changeTileVersion.prototype.setVersionName
81- * @description 设置版本号
82- * @param {string } content - 版本信息
83- * @return {this } this
81+ * @description 设置版本号。
82+ * @param {string } content - 版本信息。
83+ * @returns {this } this
8484 */
8585 setVersionName : function ( content ) {
8686 var value = content ;
@@ -93,9 +93,9 @@ export var ChangeTileVersion = L.Control.extend({
9393
9494 /**
9595 * @function L.supermap.control.changeTileVersion.prototype.setToolTip
96- * @description 设置提示信息
97- * @param {(HTMLElement|String) } tooltip - 要需要设置的提示信息
98- * @return {this } this
96+ * @description 设置提示信息。
97+ * @param {(HTMLElement|String) } tooltip - 要需要设置的提示信息。
98+ * @returns {this } this
9999 */
100100 setToolTip : function ( tooltip ) {
101101 this . tooltip . innerHTML = tooltip ;
@@ -104,8 +104,8 @@ export var ChangeTileVersion = L.Control.extend({
104104
105105 /**
106106 * @function L.supermap.control.changeTileVersion.prototype.updateLength
107- * @description 更新进度条长度
108- * @param {number } length - 进度长度参数
107+ * @description 更新进度条长度。
108+ * @param {number } length - 进度长度参数。
109109 */
110110 updateLength : function ( length ) {
111111 if ( length > 0 ) {
@@ -117,8 +117,8 @@ export var ChangeTileVersion = L.Control.extend({
117117
118118 /**
119119 * @function L.supermap.control.changeTileVersion.prototype.setLayer
120- * @description 绑定图层
121- * @param {L.supermap.tiledMapLayer } layer - 绑定的图层
120+ * @description 绑定图层。
121+ * @param {L.supermap.tiledMapLayer } layer - 绑定的图层。
122122 */
123123 setLayer : function ( layer ) {
124124 if ( layer ) {
@@ -139,8 +139,8 @@ export var ChangeTileVersion = L.Control.extend({
139139
140140 /**
141141 * @function L.supermap.control.changeTileVersion.prototype.update
142- * @description 更新缓存切片集及进度条长度
143- * @param {number } tileVersions - 待更新的切片版本号
142+ * @description 更新缓存切片集及进度条长度。
143+ * @param {number } tileVersions - 待更新的切片版本号。
144144 */
145145 update : function ( tileVersions ) {
146146 this . tileVersions = tileVersions ;
@@ -149,7 +149,7 @@ export var ChangeTileVersion = L.Control.extend({
149149
150150 /**
151151 * @function L.supermap.control.changeTileVersion.prototype.getTileSetsInfo
152- * @description 请求获取切片集信息
152+ * @description 请求获取切片集信息。
153153 */
154154 getTileSetsInfo : function ( ) {
155155 var me = this ;
@@ -162,15 +162,15 @@ export var ChangeTileVersion = L.Control.extend({
162162
163163 /**
164164 * @function L.supermap.control.changeTileVersion.prototype.removeLayer
165- * @description 移除绑定的地图图层
165+ * @description 移除绑定的地图图层。
166166 */
167167 removeLayer : function ( ) {
168168 this . options . layer = null ;
169169 } ,
170170
171171 /**
172172 * @function L.supermap.control.changeTileVersion.prototype.nextTilesVersion
173- * @description 下一个版本, 第一次不进行加减,是无版本的状态
173+ * @description 下一个版本, 第一次不进行加减,是无版本的状态。
174174 * @return {this } this
175175 */
176176 nextTilesVersion : function ( ) {
@@ -189,7 +189,7 @@ export var ChangeTileVersion = L.Control.extend({
189189
190190 /**
191191 * @function L.supermap.control.changeTileVersion.prototype.lastTilesVersion
192- * @description 上一个版本
192+ * @description 上一个版本。
193193 */
194194 lastTilesVersion : function ( ) {
195195 if ( parseInt ( this . slider . value ) < this . min + 1 ) {
@@ -202,8 +202,8 @@ export var ChangeTileVersion = L.Control.extend({
202202
203203 /**
204204 * @function L.supermap.control.changeTileVersion.prototype.tilesVersion
205- * @description 根据指定版本号请求版本
206- * @param {string } version - 版本号参数
205+ * @description 根据指定版本号请求版本。
206+ * @param {string } version - 版本号参数。
207207 */
208208 tilesVersion : function ( version ) {
209209 var layer = this . options . layer ,
@@ -220,15 +220,15 @@ export var ChangeTileVersion = L.Control.extend({
220220
221221 /**
222222 * @function L.supermap.control.changeTileVersion.prototype.getValue
223- * @description 获取进度条的值。注:(进度条的值并不是版本号)
223+ * @description 获取进度条的值。注:(进度条的值并不是版本号)。
224224 */
225225 getValue : function ( ) {
226226 return this . slider . value ;
227227 } ,
228228
229229 /**
230230 * @function L.supermap.control.changeTileVersion.prototype.getVersion
231- * @description 获取当前进度条值对应的版本号
231+ * @description 获取当前进度条值对应的版本号。
232232 */
233233 getVersion : function ( ) {
234234 var version = this . tileVersions [ this . getValue ( ) ] ;
0 commit comments