Fix map dragging and redrawing on touch

This commit is contained in:
Tom MacWright
2012-11-27 17:11:37 -05:00
parent 2a597e8e27
commit 6be5e7a89c

View File

@@ -400,13 +400,14 @@ iD.Map = function(elem, connection) {
}
}
surface.on('mouseup', function() {
if (surface.style(transformProp)) {
translateStart = null;
surface.style(transformProp, '');
redraw();
}
});
function resetTransform() {
if (!surface.style(transformProp)) return;
translateStart = null;
surface.style(transformProp, '');
redraw();
}
surface.on('mouseup', resetTransform).on('touchend', resetTransform);
function redraw(only) {
if (!only) {