remove redundant code

This commit is contained in:
Ryan Di 2025-04-02 18:52:31 +11:00
parent a99ca82389
commit 494a0e8266
2 changed files with 0 additions and 7 deletions

View file

@ -4898,10 +4898,8 @@ class App extends React.Component<AppProps, AppState> {
element: ExcalidrawTextElement, element: ExcalidrawTextElement,
{ {
isExistingElement = false, isExistingElement = false,
keepContainerDimensions = false,
}: { }: {
isExistingElement?: boolean; isExistingElement?: boolean;
keepContainerDimensions?: boolean;
}, },
) { ) {
const elementsMap = this.scene.getElementsMapIncludingDeleted(); const elementsMap = this.scene.getElementsMapIncludingDeleted();
@ -5006,7 +5004,6 @@ class App extends React.Component<AppProps, AppState> {
// the text on edit anyway (and users can select-all from contextmenu // the text on edit anyway (and users can select-all from contextmenu
// if needed) // if needed)
autoSelect: !this.device.isTouchScreen, autoSelect: !this.device.isTouchScreen,
keepContainerDimensions,
}); });
// deselect all other elements when inserting text // deselect all other elements when inserting text
this.deselectElements(); this.deselectElements();
@ -5239,7 +5236,6 @@ class App extends React.Component<AppProps, AppState> {
insertAtParentCenter = true, insertAtParentCenter = true,
container, container,
autoEdit = true, autoEdit = true,
keepContainerDimensions = false,
}: { }: {
/** X position to insert text at */ /** X position to insert text at */
sceneX: number; sceneX: number;
@ -5249,7 +5245,6 @@ class App extends React.Component<AppProps, AppState> {
insertAtParentCenter?: boolean; insertAtParentCenter?: boolean;
container?: ExcalidrawTextContainer | null; container?: ExcalidrawTextContainer | null;
autoEdit?: boolean; autoEdit?: boolean;
keepContainerDimensions?: boolean;
}) => { }) => {
let shouldBindToContainer = false; let shouldBindToContainer = false;
@ -5385,7 +5380,6 @@ class App extends React.Component<AppProps, AppState> {
if (autoEdit || existingTextElement || container) { if (autoEdit || existingTextElement || container) {
this.handleTextWysiwyg(element, { this.handleTextWysiwyg(element, {
isExistingElement: !!existingTextElement, isExistingElement: !!existingTextElement,
keepContainerDimensions,
}); });
} else { } else {
this.setState({ this.setState({

View file

@ -101,7 +101,6 @@ export const textWysiwyg = ({
excalidrawContainer: HTMLDivElement | null; excalidrawContainer: HTMLDivElement | null;
app: App; app: App;
autoSelect?: boolean; autoSelect?: boolean;
keepContainerDimensions?: boolean;
}): SubmitHandler => { }): SubmitHandler => {
const textPropertiesUpdated = ( const textPropertiesUpdated = (
updatedTextElement: ExcalidrawTextElement, updatedTextElement: ExcalidrawTextElement,