style: lint style

This commit is contained in:
2912401452 2021-09-02 13:50:19 +08:00
parent a7314f8f9e
commit e3fdc9201b
5 changed files with 13 additions and 8 deletions

View File

@ -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;

View File

@ -187,7 +187,7 @@ export default class StyleAttributeService implements IStyleAttributeService {
public createAttributesAndIndices(
features: IEncodeFeature[],
triangulation: Triangulation,
segmentNumber: number
segmentNumber: number,
): {
attributes: {
[attributeName: string]: IAttribute;

View File

@ -873,7 +873,7 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
} = this.styleAttributeService.createAttributesAndIndices(
this.encodedData,
triangulation,
segmentNumber
segmentNumber,
);
return createModel({
attributes,

View File

@ -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 = [];

View File

@ -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,
}),
];
}