@textbus/collaborate 4.5.1 → 4.5.2

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.
@@ -356,11 +356,8 @@ let Collaborate = class Collaborate {
356
356
  if (formats.length) {
357
357
  localSlot.retain(action.retain, formats);
358
358
  }
359
- localSlot.retain(localSlot.index + action.retain);
360
- }
361
- else {
362
- localSlot.retain(action.retain);
363
359
  }
360
+ localSlot.retain(localSlot.index + action.retain);
364
361
  }
365
362
  else if (action.insert) {
366
363
  const index = localSlot.index;
@@ -445,6 +442,7 @@ let Collaborate = class Collaborate {
445
442
  else if (action.type === 'delete') {
446
443
  const delta = sharedSlot.toDelta();
447
444
  if (sharedSlot.length) {
445
+ console.log([offset, action.count]);
448
446
  sharedSlot.delete(offset, action.count);
449
447
  }
450
448
  if (sharedSlot.length === 0) {
package/bundles/index.js CHANGED
@@ -358,11 +358,8 @@ exports.Collaborate = class Collaborate {
358
358
  if (formats.length) {
359
359
  localSlot.retain(action.retain, formats);
360
360
  }
361
- localSlot.retain(localSlot.index + action.retain);
362
- }
363
- else {
364
- localSlot.retain(action.retain);
365
361
  }
362
+ localSlot.retain(localSlot.index + action.retain);
366
363
  }
367
364
  else if (action.insert) {
368
365
  const index = localSlot.index;
@@ -447,6 +444,7 @@ exports.Collaborate = class Collaborate {
447
444
  else if (action.type === 'delete') {
448
445
  const delta = sharedSlot.toDelta();
449
446
  if (sharedSlot.length) {
447
+ console.log([offset, action.count]);
450
448
  sharedSlot.delete(offset, action.count);
451
449
  }
452
450
  if (sharedSlot.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/collaborate",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
4
4
  "description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -50,5 +50,5 @@
50
50
  "bugs": {
51
51
  "url": "https://github.com/textbus/textbus.git/issues"
52
52
  },
53
- "gitHead": "badc41649d7dbf25bc832bcbf37e02936ee5a847"
53
+ "gitHead": "0c14e545ff70b079ae6b44c6c2e1e09bc11cb190"
54
54
  }