@@ -4,7 +4,7 @@ import {ServerTextStyle} from './ServerTextStyle';
44
55/**
66 * @class SuperMap.LabelMixedTextStyle
7- * @category iServer Map Theme
7+ * @category iServer Map Theme
88 * @classdesc 标签文本复合风格类。
99 * @description 该类主要用于对标签专题图中标签的文本内容进行风格设置。通过该类用户可以使标签的文字显示不同的风格,
1010 * 比如文本 “喜马拉雅山”,通过本类可以将前三个字用红色显示,后两个字用蓝色显示。
@@ -16,39 +16,39 @@ import {ServerTextStyle} from './ServerTextStyle';
1616 * 第一个字符(“珠”)的索引值为0,第二个字符(“穆”)的索引值为1,以此类推;当设置分段索引值为1,3,4,9时,
1717 * 字符分段范围相应的就是(-∞,1),[1,3),[3,4),[4,9),[9,+∞),可以看出索引号为0的字符(即“珠” )在第一个分段内,
1818 * 索引号为1,2的字符(即“穆”、“朗”)位于第二个分段内,索引号为3的字符(“玛”)在第三个分段内,索引号为4的字符(“峰”)在第四个分段内,其余分段中没有字符。
19- * @param options - {Object} 可选参数。如: <br>
20- * defaultStyle - {{ @link SuperMap.ServerTextStyle}} 默认的文本复合风格。<br>
21- * separator - {string} 文本的分隔符。<br>
22- * separatorEnabled - Boolean} 文本的分隔符是否有效。<br>
23- * splitIndexes - {Array<number>} 分段索引值,分段索引值用来对文本中的字符进行分段。<br>
24- * styles - {Array<{ @link SuperMap.ServerTextStyle} > } 文本样式集合。
19+ * @param {Object } options - 参数。 <br>
20+ * @param { SuperMap.ServerTextStyle } options.defaultStyle - 默认的文本复合风格。<br>
21+ * @param { string } options. separator - 文本的分隔符。<br>
22+ * @param { boolean } options. separatorEnabled - 文本的分隔符是否有效。<br>
23+ * @param {Array. <number> } options.splitIndexes - 分段索引值,分段索引值用来对文本中的字符进行分段。<br>
24+ * @param {Array.< SuperMap.ServerTextStyle> } options.styles - 文本样式集合。
2525 */
2626export class LabelMixedTextStyle {
2727
2828 constructor ( options ) {
2929 /**
30- * @member SuperMap.LabelMixedTextStyle.prototype.defaultStyle -{SuperMap.ServerTextStyle}
30+ * @member { SuperMap.ServerTextStyle} SuperMap. LabelMixedTextStyle.prototype.defaultStyle
3131 * @description 默认的文本复合风格,即 SuperMap.ServerTextStyle 各字段的默认值。
3232 */
3333 this . defaultStyle = null ;
3434
3535 /**
36- * @member SuperMap.LabelMixedTextStyle.prototype.separator -{string}
36+ * @member {string} SuperMap.LabelMixedTextStyle.prototype.separator
3737 * @description 文本的分隔符,分隔符的风格与前一个字符的风格一样。文本的分隔符是一个将文本分割开的符号,
3838 * 比如文本 “5_109” 被 “_” 隔符为 “5” 和 “109” 两部分,假设有风格数组:style1、style2。
3939 * 在显示时,“5” 和分隔符 “_” 使用 Style1 风格渲染,字符串 “109” 使用 Style2 的风格。
4040 */
4141 this . separator = null ;
4242
4343 /**
44- * @member SuperMap.LabelMixedTextStyle.prototype.separatorEnabled -{boolean}
44+ * @member {boolean} [ SuperMap.LabelMixedTextStyle.prototype.separatorEnabled=false]
4545 * @description 文本的分隔符是否有效。分隔符有效时利用分隔符对文本进行分段;无效时根据文本中字符的位置进行分段。
46- * 分段后,同一分段内的字符具有相同的显示风格。默认为 false。
46+ * 分段后,同一分段内的字符具有相同的显示风格。
4747 */
4848 this . separatorEnabled = false ;
4949
5050 /**
51- * @member SuperMap.LabelMixedTextStyle.prototype.splitIndexes -{Array<number>}
51+ * @member {Array.<number>} SuperMap.LabelMixedTextStyle.prototype.splitIndexes
5252 * @description 分段索引值,分段索引值用来对文本中的字符进行分段。
5353 * 文本中字符的索引值是以0开始的整数,比如文本“珠穆朗玛峰”,第一个字符(“珠”)的索引值为0,第二个字符(“穆”)的索引值为1,
5454 * 以此类推;当设置分段索引值数组为[1,3,4,9]时,字符分段范围相应的就是(-∞,1),[1,3),[3,4),[4,9),[9,+∞),
@@ -58,7 +58,7 @@ export class LabelMixedTextStyle {
5858 this . splitIndexes = null ;
5959
6060 /**
61- * @member SuperMap.LabelMixedTextStyle.prototype.styles - {Array<SuperMap.ServerTextStyle>}
61+ * @member {Array. <SuperMap.ServerTextStyle>} SuperMap.LabelMixedTextStyle.prototype.styles
6262 * @description 文本样式集合。文本样式集合中的样式根据索引与不同分段一一对应,
6363 * 如果有分段没有风格对应则使用 defaultStyle。
6464 */
@@ -96,8 +96,8 @@ export class LabelMixedTextStyle {
9696 /**
9797 * @function SuperMap.LabelMixedTextStyle.fromObj
9898 * @description 从传入对象获取标签文本复合风格类。
99- * @param obj - {Object} 传入对象
100- * @return {SuperMap.LabelMixedTextStyle } 返回新的LabelMixedTextStyle对象
99+ * @param {Object } obj - 传入对象
100+ * @returns {SuperMap.LabelMixedTextStyle } 返回新的LabelMixedTextStyle对象
101101 */
102102 static fromObj ( obj ) {
103103 if ( ! obj ) {
0 commit comments