mirror of https://gitee.com/antv-l7/antv-l7
Shihui (#990)
* feat: 新增 setAutoFit 方法,允许设置图层的 autoFit 属性值 * feat: 补充 setAutoFit 方法的返回值
This commit is contained in:
parent
cfbd3941b8
commit
a780946552
|
@ -200,6 +200,7 @@ export interface ILayer {
|
||||||
id: number | { x: number; y: number },
|
id: number | { x: number; y: number },
|
||||||
option?: IActiveOption,
|
option?: IActiveOption,
|
||||||
): void;
|
): void;
|
||||||
|
setAutoFit(autoFit: boolean): void;
|
||||||
style(options: unknown): ILayer;
|
style(options: unknown): ILayer;
|
||||||
hide(): ILayer;
|
hide(): ILayer;
|
||||||
show(): ILayer;
|
show(): ILayer;
|
||||||
|
|
|
@ -795,6 +795,14 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
||||||
});
|
});
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setAutoFit(autoFit: boolean): ILayer {
|
||||||
|
this.updateLayerConfig({
|
||||||
|
autoFit,
|
||||||
|
});
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zoom to layer Bounds
|
* zoom to layer Bounds
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue