diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-05-22 19:09:56 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-05-23 11:03:59 +0200 |
commit | 15f42c493b97a58d903a50b476d7a63bf3be61ad (patch) | |
tree | ca359d197ddd7ca74bce13cfb100682b3e7be765 /loleaflet | |
parent | 51631b4e2295d7e40a0a6a03771e15609d96c730 (diff) |
lok: Restart blinking animation when moving the cursor
It provides a better user experienc that the user see the cursor at
the new positin (not in invisible state).
Change-Id: Ifa4b9c65b13901fec0c606422a7bd2a292d85608
Reviewed-on: https://gerrit.libreoffice.org/54679
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'loleaflet')
-rw-r--r-- | loleaflet/src/layer/marker/Cursor.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index 792a13485..8be48906f 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -105,6 +105,12 @@ L.Cursor = L.Layer.extend({ _setPos: function (pos) { L.DomUtil.setPosition(this._container, pos); this._container.style.zIndex = this.options.zIndex; + // Restart blinking animation + if (this.options.blink) { + L.DomUtil.removeClass(this._cursor, 'blinking-cursor'); + void this._cursor.offsetWidth; + L.DomUtil.addClass(this._cursor, 'blinking-cursor'); + } }, _setSize: function () { |