Add URL flag for translate3d

This commit is contained in:
John Firebaugh
2013-05-10 17:43:53 -07:00
parent 98e39d8b44
commit 228dfbe993
+6 -3
View File
@@ -143,6 +143,9 @@ iD.Map = function(context) {
surface.selectAll('.layer *').remove();
}
var translate3d = !iD.detect().opera &&
iD.util.stringQs(location.search.substring(1)).translate3d !== '0';
function zoomPan() {
if (d3.event && d3.event.sourceEvent.type === 'dblclick') {
if (!dblclickEnabled) {
@@ -172,9 +175,9 @@ iD.Map = function(context) {
var transform =
'scale(' + scale + ')' +
(iD.detect().opera ?
'translate(' + tX + 'px,' + tY + 'px)' :
'translate3d(' + tX + 'px,' + tY + 'px, 0)');
(translate3d ?
'translate3d(' + tX + 'px,' + tY + 'px, 0)' :
'translate(' + tX + 'px,' + tY + 'px)');
transformed = true;
supersurface.style(transformProp, transform);