Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhicks committed Jul 30, 2024
1 parent d25081f commit e6268c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/ui/handler/cooperative_gestures.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('CoopGesturesHandler', () => {

const startZoom = map.getZoom();
// simulate a single 'wheel' event
const wheelEvent = {type: 'wheel', deltaY: -simulate.magicWheelZoomDelta}
const wheelEvent = {type: 'wheel', deltaY: -simulate.magicWheelZoomDelta};
simulate.wheel(map.getCanvas(), wheelEvent);
map._renderTaskQueue.run();
expect(map.getContainer().querySelector('.maplibregl-cooperative-gesture-screen.maplibregl-show')).toBeInstanceOf(HTMLDivElement);
Expand All @@ -44,7 +44,7 @@ describe('CoopGesturesHandler', () => {
expect(cooperativegestureprevented).toHaveBeenCalledTimes(1);
expect(cooperativegestureprevented).toHaveBeenCalledWith(expect.objectContaining({
type: 'cooperativegestureprevented',
gestureType: "wheel_zoom",
gestureType: 'wheel_zoom',
}));
expect(cooperativegestureprevented.mock.calls[0][0].originalEvent).toMatchObject(wheelEvent);

Expand Down Expand Up @@ -195,9 +195,9 @@ describe('CoopGesturesHandler', () => {
expect(cooperativegestureprevented).toHaveBeenCalledTimes(1);
expect(cooperativegestureprevented).toHaveBeenCalledWith(expect.objectContaining({
type: 'cooperativegestureprevented',
gestureType: "touch_pan",
gestureType: 'touch_pan',
}));
expect(cooperativegestureprevented.mock.calls[0][0].originalEvent.touches[0].clientX).toEqual(10);
expect(cooperativegestureprevented.mock.calls[0][0].originalEvent.touches[0].clientX).toBe(10);

simulate.touchend(target);
map._renderTaskQueue.run();
Expand Down
6 changes: 3 additions & 3 deletions src/ui/handler/touch_pan.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Point from '@mapbox/point-geometry';
import {indexTouches} from './handler_util';
import { Handler } from '../handler_manager';
import type { Map } from '../map';
import {Handler} from '../handler_manager';
import type {Map} from '../map';

/**
* A `TouchPanHandler` allows the user to pan the map using touch gestures.
Expand Down Expand Up @@ -36,7 +36,7 @@ export class TouchPanHandler implements Handler {
touchmove(e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) {
if (!this._active) return;
if (this._map.cooperativeGestures.shouldPreventTouchPan(mapTouches.length)) {
this._map.cooperativeGestures.notifyGestureBlocked("touch_pan", e);
this._map.cooperativeGestures.notifyGestureBlocked('touch_pan', e);
return;
}
e.preventDefault();
Expand Down
4 changes: 2 additions & 2 deletions src/ui/handler/two_fingers_touch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Point from '@mapbox/point-geometry';
import { DOM } from '../../util/dom';
import {DOM} from '../../util/dom';
import type {Map} from '../map';
import { Handler, HandlerResult } from '../handler_manager';
import {Handler, HandlerResult} from '../handler_manager';

/**
* An options object sent to the enable function of some of the handlers
Expand Down

0 comments on commit e6268c4

Please sign in to comment.