fix mouse position calculation on RTL layout

This commit is contained in:
Nick Doiron
2016-05-06 15:22:59 -04:00
parent 6bc9e63fc3
commit e208300ca5
2 changed files with 8 additions and 0 deletions

View File

@@ -3384,6 +3384,11 @@ img.tile-removing {
right: auto;
}
[dir='rtl'] .preset-icon-fill-area {
left: auto;
right: 10px;
}
[dir='rtl'] .map-data-control .layer-list button, [dir='rtl'] .background-control .layer-list button {
float: left;
border-left: none;

View File

@@ -174,6 +174,9 @@ export function utilFastMouse(container) {
rectTop = rect.top,
clientLeft = +container.clientLeft,
clientTop = +container.clientTop;
if (iD.detect().textDirection === 'rtl') {
rectLeft = 0;
}
return function(e) {
return [
e.clientX - rectLeft - clientLeft,