@textbus/collaborate 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { Inject, Injectable, Optional } from '@tanbo/di';
14
- import { createElement, VIEW_CONTAINER, getLayoutRectByRange, SelectionBridge, getBoundingClientRect } from '@textbus/browser';
14
+ import { createElement, VIEW_CONTAINER, getLayoutRectByRange, SelectionBridge } from '@textbus/browser';
15
15
  import { Selection, Scheduler } from '@textbus/core';
16
16
  import { fromEvent, Subject, Subscription } from '@tanbo/stream';
17
17
  export class CollaborateSelectionAwarenessDelegate {
@@ -97,7 +97,7 @@ let CollaborateCursor = class CollaborateCursor {
97
97
  }
98
98
  draw(paths) {
99
99
  this.currentSelection = paths;
100
- const containerRect = getBoundingClientRect(this.container);
100
+ const containerRect = this.container.getBoundingClientRect();
101
101
  this.canvas.style.top = containerRect.top * -1 + 'px';
102
102
  this.canvas.width = this.canvas.offsetWidth;
103
103
  this.canvas.height = this.canvas.offsetHeight;
@@ -268,4 +268,4 @@ CollaborateCursor = __decorate([
268
268
  Selection])
269
269
  ], CollaborateCursor);
270
270
  export { CollaborateCursor };
271
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUtY3Vyc29yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxhYm9yYXRlLWN1cnNvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFDeEQsT0FBTyxFQUNMLGFBQWEsRUFDYixjQUFjLEVBQ2Qsb0JBQW9CLEVBQ3BCLGVBQWUsRUFDZixxQkFBcUIsRUFDdEIsTUFBT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mIChjaGlsZCkge1xuICAgICAgY29uc3QgYW5jaG9yID0gY2hpbGQuY2hpbGRyZW5bMF0gYXMgSFRNTEVsZW1lbnRcbiAgICAgIHJldHVybiB7XG4gICAgICAgIGN1cnNvcjogY2hpbGQsXG4gICAgICAgIGFuY2hvcixcbiAgICAgICAgdXNlclRpcDogYW5jaG9yLmNoaWxkcmVuWzBdIGFzIEhUTUxFbGVtZW50XG4gICAgICB9XG4gICAgfVxuICAgIGNvbnN0IHVzZXJUaXAgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICBkaXNwbGF5OiAnbm9uZScsXG4gICAgICAgIGxlZnQ6ICc1MCUnLFxuICAgICAgICB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyxcbiAgICAgICAgbWFyZ2luQm90dG9tOiAnMnB4JyxcbiAgICAgICAgYm90dG9tOiAnMTAwJScsXG4gICAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgICAgICBjb2xvcjogJyNmZmYnLFxuICAgICAgICBib3hTaGFkb3c6ICcwIDFweCAycHggcmdiYSgwLDAsMCwuMSknLFxuICAgICAgICBib3JkZXJSYWRpdXM6ICczcHgnLFxuICAgICAgICBwYWRkaW5nOiAnM3B4IDVweCcsXG4gICAgICAgIHBvaW50ZXJFdmVudHM6ICdub25lJyxcbiAgICAgIH1cbiAgICB9KVxuXG4gICAgY29uc3QgYW5jaG9yID0gY3JlYXRlRWxlbWVudCgnc3BhbicsIHtcbiAgICAgIHN0eWxlczoge1xuICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgICAgdG9wOiAnLTJweCcsXG4gICAgICAgIGxlZnQ6ICctMnB4JyxcbiAgICAgICAgd2lkdGg6ICc2cHgnLFxuICAgICAgICBoZWlnaHQ6ICc2cHgnLFxuICAgICAgICBwb2ludGVyRXZlbn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bWVudFxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgY3Vyc29yOiBjaGlsZCxcbiAgICAgICAgYW5jaG9yLFxuICAgICAgICB1c2VyVGlwOiBhbmNob3IuY2hpbGRyZW5bMF0gYXMgSFRNTEVsZW1lbnRcbiAgICAgIH1cbiAgICB9XG4gICAgY29uc3QgdXNlclRpcCA9IGNyZWF0ZUVsZW1lbnQoJ3NwYW4nLCB7XG4gICAgICBzdHlsZXM6IHtcbiAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICAgIGRpc3BsYXk6ICdub25lJyxcbiAgICAgICAgbGVmdDogJzUwJScsXG4gICAgICAgIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknLFxuICAgICAgICBtYXJnaW5Cb3R0b206ICcycHgnLFxuICAgICAgICBib3R0b206ICcxMDAlJyxcbiAgICAgICAgd2hpdGVTcGFjZTogJ25vd3JhcCcsXG4gICAgICAgIGNvbG9yOiAnI2ZmZicsXG4gICAgICAgIGJveFNoYWRvdzogJzAgMXB4IDJweCByZ2JhKDAsMCwwLC4xKScsXG4gICAgICAgIGJvcmRlclJhZGl1czogJzNweCcsXG4gICAgICAgIHBhZGRpbmc6ICczcHggNXB4JyxcbiAgICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgfVxuICAgIH0pXG5cbiAgICBjb25zdCBhbmNob3IgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICB0b3A6ICctMnB4JyxcbiAgICAgICAgbGVmdDogJy0ycHgnLFxuICAgICAgICB3aWR0aDogJzZweCcsXG4gICAgICAgIGhlaWdodDogJzZweCcsXG4gICAgICAgIHBvaW50ZXJFdmVudHM6ICdhdXRvJyxcbiAgICAgICAgcG9pbnRlcjogJ2N1cnNvcicsXG4gICAgICB9LFxuICAgICAgY2hpbGRyZW46IFt1c2VyVGlwXSxcbiAgICAgIG9uOiB7XG4gICAgICAgIG1vdXNlZW50ZXIoKSB7XG4gICAgICAgICAgdXNlclRpcC5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJ1xuICAgICAgICB9LFxuICAgICAgICBtb3VzZWxlYXZlKCkge1xuICAgICAgICAgIHVzZXJUaXAuc3R5bGUuZGlzcGxheSA9ICdub25lJ1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSlcbiAgICBjaGlsZCA9IGNyZWF0ZUVsZW1lbnQoJ3NwYW4nLCB7XG4gICAgICBzdHlsZXM6IHtcbiAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICB9LFxuICAgICAgY2hpbGRyZW46IFtcbiAgICAgICAgYW5jaG9yXG4gICAgICBdXG4gICAgfSlcbiAgICB0aGlzLnRvb2x0aXBzLmFwcGVuZChjaGlsZClcbiAgICByZXR1cm4ge1xuICAgICAgY3Vyc29yOiBjaGlsZCxcbiAgICAgIGFuY2hvcixcbiAgICAgIHVzZXJUaXBcbiAgICB9XG4gIH1cbn1cbiJdfQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/collaborate",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
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/public-api.js",
6
6
  "module": "./bundles/public-api.js",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@tanbo/di": "^1.1.3",
29
29
  "@tanbo/stream": "^1.1.5",
30
- "@textbus/browser": "^2.0.1",
31
- "@textbus/core": "^2.0.0",
30
+ "@textbus/browser": "^2.1.0",
31
+ "@textbus/core": "^2.1.0",
32
32
  "reflect-metadata": "^0.1.13",
33
33
  "y-protocols": "^1.0.5",
34
34
  "yjs": "^13.5.39"
@@ -44,5 +44,5 @@
44
44
  "bugs": {
45
45
  "url": "https://github.com/textbus/textbus.git/issues"
46
46
  },
47
- "gitHead": "e91d20de02dbae69c5633fd8793f0094a5e91afc"
47
+ "gitHead": "cff4256cd75818a7845e2f0b0595596369656f43"
48
48
  }
@@ -3,8 +3,7 @@ import {
3
3
  createElement,
4
4
  VIEW_CONTAINER,
5
5
  getLayoutRectByRange,
6
- SelectionBridge,
7
- getBoundingClientRect
6
+ SelectionBridge
8
7
  } from '@textbus/browser'
9
8
  import { Selection, SelectionPaths, AbstractSelection, Scheduler, Rect } from '@textbus/core'
10
9
  import { fromEvent, Subject, Subscription } from '@tanbo/stream'
@@ -117,7 +116,7 @@ export class CollaborateCursor {
117
116
 
118
117
  draw(paths: RemoteSelection[]) {
119
118
  this.currentSelection = paths
120
- const containerRect = getBoundingClientRect(this.container)
119
+ const containerRect = this.container.getBoundingClientRect()
121
120
  this.canvas.style.top = containerRect.top * -1 + 'px'
122
121
  this.canvas.width = this.canvas.offsetWidth
123
122
  this.canvas.height = this.canvas.offsetHeight