@lvce-editor/editor-worker 19.61.2 → 19.61.3
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/editorWorkerMain.js +5 -5
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -15294,10 +15294,10 @@ const getCursorsVirtualDom = cursors => {
|
|
|
15294
15294
|
return dom;
|
|
15295
15295
|
};
|
|
15296
15296
|
|
|
15297
|
-
const getEditorCursorsVirtualDom = cursorInfos => {
|
|
15298
|
-
const cursorsDom = getCursorsVirtualDom([...cursorInfos]);
|
|
15297
|
+
const getEditorCursorsVirtualDom = (cursorInfos, focused = true) => {
|
|
15298
|
+
const cursorsDom = focused ? getCursorsVirtualDom([...cursorInfos]) : [];
|
|
15299
15299
|
return [{
|
|
15300
|
-
childCount: cursorInfos.length,
|
|
15300
|
+
childCount: focused ? cursorInfos.length : 0,
|
|
15301
15301
|
className: 'LayerCursor',
|
|
15302
15302
|
type: Div
|
|
15303
15303
|
}, ...cursorsDom];
|
|
@@ -15553,7 +15553,7 @@ const editorLayersNode = {
|
|
|
15553
15553
|
type: Div
|
|
15554
15554
|
};
|
|
15555
15555
|
const getEditorLayersVirtualDom = (selectionInfos, textInfos, differences, lineNumbers = true, highlightedLine = -1, cursorInfos = [], diagnostics = [], visibleLineIndices = [], endOfLineDecorations = [], bracketMatchInfos = [], focused = true, visibleViewLineIndices = [], problemsHighlightedRow = -1, roundedSelection = false) => {
|
|
15556
|
-
return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos, focused, roundedSelection), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow), ...getEditorCursorsVirtualDom(cursorInfos), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos)];
|
|
15556
|
+
return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos, focused, roundedSelection), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow), ...getEditorCursorsVirtualDom(cursorInfos, focused), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos)];
|
|
15557
15557
|
};
|
|
15558
15558
|
|
|
15559
15559
|
const getEditorScrollBarDiagnosticsVirtualDom = scrollBarDiagnostics => {
|
|
@@ -16061,7 +16061,7 @@ const renderSelections = {
|
|
|
16061
16061
|
cursorInfos = [],
|
|
16062
16062
|
selectionInfos = []
|
|
16063
16063
|
} = newState;
|
|
16064
|
-
const cursorsDom = getCursorsVirtualDom(cursorInfos);
|
|
16064
|
+
const cursorsDom = newState.focused ? getCursorsVirtualDom(cursorInfos) : [];
|
|
16065
16065
|
const selectionsDom = getSelectionsVirtualDom(selectionInfos, newState.focused, newState.roundedSelection);
|
|
16066
16066
|
return [/* method */'setSelections', cursorsDom, selectionsDom];
|
|
16067
16067
|
},
|