-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix text overflow and submit on enter (#40)
<!-- Thank you for submitting a pull request! Here's a checklist you might find useful. [ ] There is an associated issue that is labelled 'Bug' or 'help wanted' or is in the Community milestone [ ] Code is up-to-date with the `main` branch [ ] You've successfully run `npm test` locally [ ] There are new or updated tests validating the change --> Fixes #
- Loading branch information
1 parent
f953fb7
commit da82a54
Showing
5 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import type {LngLat} from '@mappable-world/mappable-types'; | ||
|
||
export function createMMapElement(className?: string): HTMLElement { | ||
const el = document.createElement('mappable'); | ||
if (className) { | ||
el.className = className; | ||
} | ||
return el; | ||
} | ||
|
||
export function areFuzzyEqual(a: LngLat, b: LngLat, tolerance = 1e-6): boolean { | ||
const d = [a[0] - b[0], a[1] - b[1]]; | ||
return -tolerance < d[0] && d[0] < tolerance && -tolerance < d[1] && d[1] < tolerance; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters