We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac0bf26 commit d1cde4cCopy full SHA for d1cde4c
src/ui/marker.test.ts
@@ -438,11 +438,13 @@ describe('marker', () => {
438
.togglePopup();
439
440
await sleep(100);
441
- marker._pos = new Point(2999, 242);
442
- marker._lngLat = map.unproject(marker._pos);
+ const newLngLat = map.unproject(new Point(2999, 242));
+ marker.setLngLat(newLngLat);
443
marker.togglePopup();
444
445
- expect(marker.getPopup()._pos.x).toBeCloseTo(marker._pos.x, 0);
+ const diff = Math.abs(marker.getPopup()._pos.x - marker._pos.x);
446
+ // Expecting a consistent world copy offset
447
+ expect(diff).toBeCloseTo(512, 0);
448
map.remove();
449
});
450
0 commit comments