2 Commits

Author SHA1 Message Date
348b721876 1.11.1 2026-01-27 15:05:08 +07:00
3d982a6a7c More kinetic panning optimizations 2026-01-27 15:04:25 +07:00
6 changed files with 16 additions and 11 deletions

View File

@@ -374,6 +374,16 @@ export default class MapComponent extends Component {
? new Kinetic(-0.005, 0.05, 100)
: false;
// Fix for "sticky" touches on mobile:
// If we're on mobile (width <= 768) AND using kinetic,
// we increase the minimum velocity required to trigger kinetic panning.
// This prevents slow drags from being interpreted as a "throw"
if (this.settings.mapKinetic && window.innerWidth <= 768) {
// Default minVelocity is 0.05. We bump it up significantly.
// This means the user has to really "flick" the map to get inertia.
kinetic.minVelocity_ = 0.25;
}
this.mapInstance.addInteraction(
new DragPan({
kinetic: kinetic,

View File

@@ -28,13 +28,8 @@ export default class SettingsService extends Service {
const savedKinetic = localStorage.getItem('marco:map-kinetic');
if (savedKinetic !== null) {
this.mapKinetic = savedKinetic === 'true';
} else {
// Default: disabled on small screens (mobile), enabled on desktop
// We check for typical mobile width (<= 768px)
if (typeof window !== 'undefined') {
this.mapKinetic = window.innerWidth > 768;
}
}
// Default is true (initialized in class field)
}
updateOverpassApi(url) {

View File

@@ -1,6 +1,6 @@
{
"name": "marco",
"version": "1.11.0",
"version": "1.11.1",
"private": true,
"description": "Unhosted maps app",
"repository": {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -26,7 +26,7 @@
<meta name="msapplication-TileColor" content="#F6E9A6">
<meta name="msapplication-TileImage" content="/icons/icon-144.png">
<script type="module" crossorigin src="/assets/main-y8e9Z0x2.js"></script>
<script type="module" crossorigin src="/assets/main-DlYgnqpR.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-D53xPL_H.css">
</head>
<body>