@seafile/sdoc-editor 2.0.88-test-0.0.3 → 2.0.88-test-0.0.4
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 +2 -1
- package/package.json +1 -1
package/dist/socket/helpers.js
CHANGED
|
@@ -274,8 +274,10 @@ 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
|
+
// Get front Point as cursor
|
|
277
278
|
var anchor = location.anchor,
|
|
278
279
|
focus = location.focus;
|
|
280
|
+
console.log(3, _slate.Editor.start(editor, location));
|
|
279
281
|
var newLocation = location;
|
|
280
282
|
if (!_slate.Point.equals(anchor, focus)) {
|
|
281
283
|
if (_slate.Point.compare(anchor, focus) === -1) {
|
|
@@ -291,7 +293,6 @@ var syncRemoteCursorLocation = exports.syncRemoteCursorLocation = function syncR
|
|
|
291
293
|
}
|
|
292
294
|
}
|
|
293
295
|
(0, _helper.setCursor)(editor, user, newLocation, cursorData);
|
|
294
|
-
console.log(4, newLocation, cursorData, editor.cursors, editor.onCursor);
|
|
295
296
|
|
|
296
297
|
// sync cursor position
|
|
297
298
|
editor.onCursor && editor.onCursor(editor.cursors);
|