mirror of https://gitee.com/antv-l7/antv-l7
style: lint style
This commit is contained in:
parent
a7314f8f9e
commit
e3fdc9201b
|
@ -161,7 +161,7 @@ export interface IStyleAttribute extends IStyleAttributeInitializationOptions {
|
|||
|
||||
export type Triangulation = (
|
||||
feature: IEncodeFeature,
|
||||
segmentNumber?: number
|
||||
segmentNumber?: number,
|
||||
) => {
|
||||
vertices: number[];
|
||||
indices: number[];
|
||||
|
@ -198,7 +198,7 @@ export interface IStyleAttributeService {
|
|||
createAttributesAndIndices(
|
||||
encodedFeatures: IEncodeFeature[],
|
||||
triangulation?: Triangulation,
|
||||
segmentNumber?: number
|
||||
segmentNumber?: number,
|
||||
): {
|
||||
attributes: {
|
||||
[attributeName: string]: IAttribute;
|
||||
|
|
|
@ -187,7 +187,7 @@ export default class StyleAttributeService implements IStyleAttributeService {
|
|||
public createAttributesAndIndices(
|
||||
features: IEncodeFeature[],
|
||||
triangulation: Triangulation,
|
||||
segmentNumber: number
|
||||
segmentNumber: number,
|
||||
): {
|
||||
attributes: {
|
||||
[attributeName: string]: IAttribute;
|
||||
|
|
|
@ -873,7 +873,7 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
|||
} = this.styleAttributeService.createAttributesAndIndices(
|
||||
this.encodedData,
|
||||
triangulation,
|
||||
segmentNumber
|
||||
segmentNumber,
|
||||
);
|
||||
return createModel({
|
||||
attributes,
|
||||
|
|
|
@ -202,7 +202,10 @@ export function RasterImageTriangulation(feature: IEncodeFeature) {
|
|||
* @param feature 映射数据
|
||||
* @param segNum 弧线线段数
|
||||
*/
|
||||
export function LineArcTriangulation(feature: IEncodeFeature, segmentNumber?: number) {
|
||||
export function LineArcTriangulation(
|
||||
feature: IEncodeFeature,
|
||||
segmentNumber?: number,
|
||||
) {
|
||||
const segNum = segmentNumber ? segmentNumber : 30;
|
||||
const coordinates = feature.coordinates as IPosition[];
|
||||
const positions = [];
|
||||
|
|
|
@ -132,8 +132,10 @@ export default class ArcModel extends BaseModel {
|
|||
}
|
||||
|
||||
public buildModels(): IModel[] {
|
||||
let { segmentNumber = 30 } = this.layer.getLayerConfig() as ILineLayerStyleOptions;
|
||||
|
||||
const {
|
||||
segmentNumber = 30,
|
||||
} = this.layer.getLayerConfig() as ILineLayerStyleOptions;
|
||||
|
||||
return [
|
||||
this.layer.buildLayerModel({
|
||||
moduleName: 'arc2dline',
|
||||
|
@ -142,7 +144,7 @@ export default class ArcModel extends BaseModel {
|
|||
triangulation: LineArcTriangulation,
|
||||
depth: { enable: false },
|
||||
blend: this.getBlend(),
|
||||
segmentNumber
|
||||
segmentNumber,
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue