@seafile/sdoc-editor 2.0.88 → 2.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/socket/helpers.js +12 -1
- package/package.json +2 -2
package/dist/socket/helpers.js
CHANGED
|
@@ -274,7 +274,18 @@ var syncRemoteOperations = exports.syncRemoteOperations = function syncRemoteOpe
|
|
|
274
274
|
var syncRemoteCursorLocation = exports.syncRemoteCursorLocation = function syncRemoteCursorLocation(editor, user, location, cursorData) {
|
|
275
275
|
var currentUser = editor.user;
|
|
276
276
|
if (user && user.username !== currentUser.username) {
|
|
277
|
-
|
|
277
|
+
// Get front Point as cursor
|
|
278
|
+
var anchor = location.anchor,
|
|
279
|
+
focus = location.focus;
|
|
280
|
+
var newLocation = location;
|
|
281
|
+
if (!_slate.Point.equals(anchor, focus)) {
|
|
282
|
+
var frontPoint = _slate.Editor.start(editor, location);
|
|
283
|
+
newLocation = {
|
|
284
|
+
anchor: frontPoint,
|
|
285
|
+
focus: frontPoint
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
(0, _helper.setCursor)(editor, user, newLocation, cursorData);
|
|
278
289
|
|
|
279
290
|
// sync cursor position
|
|
280
291
|
editor.onCursor && editor.onCursor(editor.cursors);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.89",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "e9eb8bd2f2c9b1ba5219ae8f7a1af64907040f73"
|
|
74
74
|
}
|