mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
fix mouse position calculation on RTL layout
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user