Commit eb0789be authored by Adrien Pavie's avatar Adrien Pavie
Browse files

Fix double-tap partial drawing + sort shapes by date

parent 6d4b5649
......@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Next version (to be released)
### Fixed
- Geometry sorted by date
- Avoid partial drawing when double-tap on mobile
## 0.2.0 - 2020-02-14
......
......@@ -41,8 +41,12 @@ SELECT
'id', id
)), ARRAY[]::json[]) AS features,
ST_AsGeoJSON(ST_Envelope(ST_Collect(geom)))::json AS envelope
FROM shape
WHERE sketch = $1
FROM (
SELECT *
FROM shape
WHERE sketch = $1
ORDER BY created
) a
`, [ sid ])
.then(result2 => {
geojson.features = result2.rows[0].features;
......
......@@ -419,6 +419,11 @@ function enableDrawing() {
map.on("mousemove", continueTmpShape);
map.on("zoomanim", removeTmpShape);
map.on("mouseup", finishShapeDrawing);
document.getElementById("map").addEventListener("touchmove", e => {
if(e.targetTouches.length > 1) {
removeTmpShape(e);
}
});
$("#map").mouseleave(finishShapeDrawing);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment