[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Thu Feb 8 09:36:28 UTC 2018
loleaflet/dist/leaflet.css | 4 ++--
loleaflet/src/layer/tile/TileLayer.js | 5 +++++
loleaflet/src/map/Map.js | 3 ++-
3 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 1e91799663945fdfde84385bcfbb96fd03c6fe2e
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Thu Feb 8 15:04:29 2018 +0530
Move the IME candidate window with cursor position
Change-Id: I7b37b0c4981b4ebcefb7606915711ca2adec3c31
diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index c324ebfd..b2bf8115 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -679,7 +679,7 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header {
}
.clipboard-container {
- position: fixed;
+ position: absolute;
left: 0px;
top: 0px;
width: 0px;
@@ -863,4 +863,4 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header {
border-radius: 2px;
top: 24px;
color: white;
- }
\ No newline at end of file
+ }
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 1494fe88..3752f58b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1534,6 +1534,11 @@ L.TileLayer = L.GridLayer.extend({
this._cursorMarker.setLatLng(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())));
}
this._map.addLayer(this._cursorMarker);
+
+ // move the hidden input field with the cursor
+ var clipContainer = L.DomUtil.get('doc-clipboard-container');
+ var pos = this._map.latLngToLayerPoint(L.latLng(cursorPos)).round();
+ L.DomUtil.setPosition(clipContainer, pos);
}
else if (this._cursorMarker) {
this._map.removeLayer(this._cursorMarker);
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index f2b31925..c90b6a0c 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -692,7 +692,8 @@ L.Map = L.Evented.extend({
throw new Error('Map container is already initialized.');
}
- var textAreaContainer = L.DomUtil.create('div', 'clipboard-container', container.parentElement);
+ var textAreaContainer = L.DomUtil.create('div', 'clipboard-container', container);
+ textAreaContainer.id = 'doc-clipboard-container';
this._textArea = L.DomUtil.create('input', 'clipboard', textAreaContainer);
this._textArea.setAttribute('type', 'text');
this._textArea.setAttribute('autocorrect', 'off');
More information about the Libreoffice-commits
mailing list