mirror of https://gitee.com/antv-l7/antv-l7
test: updaye move feature test
This commit is contained in:
parent
002cbe3664
commit
e273ffedbf
|
@ -48,11 +48,15 @@ describe('moveFeature', () => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
it('move Point', () => {
|
it('move Point', () => {
|
||||||
const res = moveFeature([pointFeature], delta);
|
const res = moveFeature([pointFeature], delta) as Array<
|
||||||
|
Feature<Geometry, Properties>
|
||||||
|
>;
|
||||||
expect(res[0].geometry.coordinates).toEqual([131, 48]);
|
expect(res[0].geometry.coordinates).toEqual([131, 48]);
|
||||||
});
|
});
|
||||||
it('move BBox', () => {
|
it('move BBox', () => {
|
||||||
const res = moveFeature([polyon], delta);
|
const res = moveFeature([polyon], delta) as Array<
|
||||||
|
Feature<Geometry, Properties>
|
||||||
|
>;
|
||||||
expect(res[0].geometry.coordinates).toEqual([
|
expect(res[0].geometry.coordinates).toEqual([
|
||||||
[
|
[
|
||||||
[50.5703125, 46.583289756006316],
|
[50.5703125, 46.583289756006316],
|
||||||
|
@ -64,7 +68,9 @@ describe('moveFeature', () => {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
it('move line', () => {
|
it('move line', () => {
|
||||||
const res = moveFeature([line], delta);
|
const res = moveFeature([line], delta) as Array<
|
||||||
|
Feature<Geometry, Properties>
|
||||||
|
>;
|
||||||
expect(res[0].geometry.coordinates).toEqual([
|
expect(res[0].geometry.coordinates).toEqual([
|
||||||
[55.31640625, 63.91523303947614],
|
[55.31640625, 63.91523303947614],
|
||||||
[72.015625, 63.59334083012024],
|
[72.015625, 63.59334083012024],
|
||||||
|
|
Loading…
Reference in New Issue