fix:lint
This commit is contained in:
1 parent
1b337e9766
commit
e795655bd9
1 file changed
+3
-6
@@ -1057,13 +1057,10 @@ export class SelectionManager implements VirgoSelection {
|
|||||||
* @memberof SelectionManager
|
* @memberof SelectionManager
|
||||||
*/
|
*/
|
||||||
public moveCursor(index: number, blockId: string): void {
|
public moveCursor(index: number, blockId: string): void {
|
||||||
const now_range = window.getSelection().getRangeAt(0);
|
const nowRange = window.getSelection().getRangeAt(0);
|
||||||
let preRang = document.createRange();
|
let preRang = document.createRange();
|
||||||
preRang.setStart(
|
preRang.setStart(nowRange.startContainer, nowRange.startOffset + index);
|
||||||
now_range.startContainer,
|
preRang.setEnd(nowRange.endContainer, nowRange.endOffset + index);
|
||||||
now_range.startOffset + index
|
|
||||||
);
|
|
||||||
preRang.setEnd(now_range.endContainer, now_range.endOffset + index);
|
|
||||||
let prePosition = preRang.getClientRects().item(0);
|
let prePosition = preRang.getClientRects().item(0);
|
||||||
this.activeNodeByNodeId(
|
this.activeNodeByNodeId(
|
||||||
blockId,
|
blockId,
|
||||||
|
|||||||
Reference in new issue
Block a user