Skip to content

Commit

Permalink
renamed vars
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency committed Nov 27, 2024
1 parent e89e25f commit 6cf7309
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
getParentNodes,
generateCodeForAiTransform,
type TextareaRowData,
updateTextareaValue,
getUpdatedTextareaValue,
getTextareaCursorPosition,
} from './utils';
import { useTelemetry } from '@/composables/useTelemetry';
Expand Down Expand Up @@ -176,15 +176,15 @@ function cleanTextareaRowsData() {
async function onDrop(value: string, event: MouseEvent) {
value = propertyNameFromExpression(value);
prompt.value = updateTextareaValue(event, textareaRowsData.value, value);
prompt.value = getUpdatedTextareaValue(event, textareaRowsData.value, value);
emit('valueChanged', {
name: getPath(props.parameter.name),
value: prompt.value,
});
}
async function highlightCursorPosition(event: MouseEvent, activeDrop: boolean) {
async function updateCursorPositionOnMouseMove(event: MouseEvent, activeDrop: boolean) {
if (!activeDrop) return;
const textarea = event.target as HTMLTextAreaElement;
Expand Down Expand Up @@ -240,7 +240,7 @@ async function highlightCursorPosition(event: MouseEvent, activeDrop: boolean) {
:maxlength="inputFieldMaxLength"
:placeholder="parameter.placeholder"
@input="onPromptInput"
@mousemove="highlightCursorPosition($event, activeDrop)"
@mousemove="updateCursorPositionOnMouseMove($event, activeDrop)"
@mouseleave="cleanTextareaRowsData"
/>
</template>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/components/ButtonParameter/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const getColumnIndex = (rowText: string, textareaX: number, font: string) => {
return rowText.length === col ? col : col - 1;
};

export function updateTextareaValue(
export function getUpdatedTextareaValue(
event: MouseEvent,
textareaRowsData: TextareaRowData | null,
value: string,
Expand Down

0 comments on commit 6cf7309

Please sign in to comment.