@lvce-editor/find-widget-worker 3.16.1 → 3.16.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.
- package/dist/findWidgetWorkerMain.js +20 -3
- package/package.json +1 -1
|
@@ -2612,8 +2612,7 @@ const findMatchesCaseInsensitive = (lines, searchString) => {
|
|
|
2612
2612
|
return findRegexMatches(lines, regex);
|
|
2613
2613
|
};
|
|
2614
2614
|
|
|
2615
|
-
const getFindWidgetPosition = (editorX, editorY, editorWidth) => {
|
|
2616
|
-
const width = 300;
|
|
2615
|
+
const getFindWidgetPosition = (editorX, editorY, editorWidth, width = 300) => {
|
|
2617
2616
|
const height = 30;
|
|
2618
2617
|
const paddingTop = 10;
|
|
2619
2618
|
const paddingRight = 20;
|
|
@@ -3423,7 +3422,25 @@ const renderInstance = (instanceId, diffResult) => {
|
|
|
3423
3422
|
};
|
|
3424
3423
|
|
|
3425
3424
|
const resize = async (state, dimensions) => {
|
|
3426
|
-
|
|
3425
|
+
const {
|
|
3426
|
+
height: editorHeight,
|
|
3427
|
+
width: editorWidth,
|
|
3428
|
+
x: editorX,
|
|
3429
|
+
y: editorY
|
|
3430
|
+
} = dimensions;
|
|
3431
|
+
const {
|
|
3432
|
+
width: widgetWidth
|
|
3433
|
+
} = state;
|
|
3434
|
+
const position = getFindWidgetPosition(editorX, editorY, editorWidth, widgetWidth);
|
|
3435
|
+
return {
|
|
3436
|
+
...state,
|
|
3437
|
+
editorHeight,
|
|
3438
|
+
editorWidth,
|
|
3439
|
+
editorX,
|
|
3440
|
+
editorY,
|
|
3441
|
+
x: position.x,
|
|
3442
|
+
y: position.y
|
|
3443
|
+
};
|
|
3427
3444
|
};
|
|
3428
3445
|
|
|
3429
3446
|
const saveState = state => {
|