@textbus/collaborate 2.0.0-beta.6 → 2.0.0-beta.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ export interface RemoteSelectionCursor {
|
|
21
21
|
userTip: HTMLElement;
|
22
22
|
}
|
23
23
|
export declare abstract class CollaborateCursorAwarenessDelegate {
|
24
|
-
abstract getRects(range: TBRange, nativeRange: Range):
|
24
|
+
abstract getRects(range: TBRange, nativeRange: Range): false | Rect[];
|
25
25
|
}
|
26
26
|
export declare class CollaborateCursor {
|
27
27
|
private container;
|
@@ -132,14 +132,17 @@ let CollaborateCursor = class CollaborateCursor {
|
|
132
132
|
const nativeRange = this.document.createRange();
|
133
133
|
nativeRange.setStart(start.node, start.offset);
|
134
134
|
nativeRange.setEnd(end.node, end.offset);
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
135
|
+
let rects = false;
|
136
|
+
if (this.awarenessDelegate) {
|
137
|
+
rects = this.awarenessDelegate.getRects({
|
138
|
+
startOffset,
|
139
|
+
endOffset,
|
140
|
+
startSlot,
|
141
|
+
endSlot
|
142
|
+
}, nativeRange);
|
143
|
+
}
|
141
144
|
if (!rects) {
|
142
|
-
|
145
|
+
rects = nativeRange.getClientRects();
|
143
146
|
}
|
144
147
|
const selectionRects = [];
|
145
148
|
for (let i = rects.length - 1; i >= 0; i--) {
|
@@ -262,4 +265,4 @@ CollaborateCursor = __decorate([
|
|
262
265
|
Selection])
|
263
266
|
], CollaborateCursor);
|
264
267
|
export { CollaborateCursor };
|
265
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUtY3Vyc29yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxhYm9yYXRlLWN1cnNvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFV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W4nLCB7XG4gICAgICBzdHlsZXM6IHtcbiAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICAgIGRpc3BsYXk6ICdub25lJyxcbiAgICAgICAgbGVmdDogJzUwJScsXG4gICAgICAgIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknLFxuICAgICAgICBtYXJnaW5Cb3R0b206ICcycHgnLFxuICAgICAgICBib3R0b206ICcxMDAlJyxcbiAgICAgICAgd2hpdGVTcGFjZTogJ25vd3JhcCcsXG4gICAgICAgIGNvbG9yOiAnI2ZmZicsXG4gICAgICAgIGJveFNoYWRvdzogJzAgMXB4IDJweCByZ2JhKDAsMCwwLC4xKScsXG4gICAgICAgIGJvcmRlclJhZGl1czogJzNweCcsXG4gICAgICAgIHBhZGRpbmc6ICczcHggNXB4JyxcbiAgICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgfVxuICAgIH0pXG5cbiAgICBjb25zdCBhbmNob3IgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICB0b3A6ICctMnB4JyxcbiAgICAgICAgbGVmdDogJy0ycHgnLFxuICAgICAgICB3aWR0aDogJzZweCcsXG4gICAgICAgIGhlaWdodDogJzZweCcsXG4gICAgICAgIHBvaW50ZXJFdmVudHM6ICdhdXRvJyxcbiAgICAgICAgcG9pbnRlcjogJ2N1cnNvcicsXG4gICAgICB9LFxuICAgICAgY2hpbGRyZW46IFt1c2VyVGlwXSxcbiAgICAgIG9uOiB7XG4gICAgICAgIG1vdXNlZW50ZXIoKSB7XG4gICAgICAgICAgdXNlclRpcC5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJ1xuICAgICAgICB9LFxuICAgICAgICBtb3VzZWxlYXZlKCkge1xuICAgICAgICAgIHVzZXJUaXAuc3R5bGUuZGlzcGxheSA9ICdub25lJ1x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aG9yLFxuICAgICAgdXNlclRpcFxuICAgIH1cbiAgfVxufVxuIl19
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/collaborate",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.7",
|
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",
|
@@ -44,5 +44,5 @@
|
|
44
44
|
"bugs": {
|
45
45
|
"url": "https://github.com/textbus/textbus.git/issues"
|
46
46
|
},
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "0f21f01012a2efc210dbf393b55393c961197b5d"
|
48
48
|
}
|
@@ -34,7 +34,7 @@ export interface RemoteSelectionCursor {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
export abstract class CollaborateCursorAwarenessDelegate {
|
37
|
-
abstract getRects(range: TBRange, nativeRange: Range):
|
37
|
+
abstract getRects(range: TBRange, nativeRange: Range): false | Rect[]
|
38
38
|
}
|
39
39
|
|
40
40
|
@Injectable()
|
@@ -116,14 +116,17 @@ export class CollaborateCursor {
|
|
116
116
|
nativeRange.setStart(start.node, start.offset)
|
117
117
|
nativeRange.setEnd(end.node, end.offset)
|
118
118
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
119
|
+
let rects: Rect[] | DOMRectList | false = false
|
120
|
+
if (this.awarenessDelegate) {
|
121
|
+
rects = this.awarenessDelegate.getRects({
|
122
|
+
startOffset,
|
123
|
+
endOffset,
|
124
|
+
startSlot,
|
125
|
+
endSlot
|
126
|
+
}, nativeRange)
|
127
|
+
}
|
125
128
|
if (!rects) {
|
126
|
-
|
129
|
+
rects = nativeRange.getClientRects()
|
127
130
|
}
|
128
131
|
const selectionRects: SelectionRect[] = []
|
129
132
|
for (let i = rects.length - 1; i >= 0; i--) {
|