rename name to customType

This commit is contained in:
ad1992 2022-03-24 14:04:31 +05:30
parent 3d0a1106ff
commit 8706277d14
11 changed files with 22 additions and 22 deletions

View file

@ -421,11 +421,11 @@ class App extends React.Component<AppProps, AppState> {
renderCustomElement = (
coords: { x: number; y: number },
name: string = "",
customType: string = "",
) => {
const config = getCustomElementConfig(
this.props.customElementsConfig,
name,
customType,
);
if (!config) {
return;
@ -438,7 +438,7 @@ class App extends React.Component<AppProps, AppState> {
const width = config.width || 40;
const height = config.height || 40;
const customElement = newCustomElement(name, {
const customElement = newCustomElement(customType, {
type: "custom",
x: gridX - width / 2,
y: gridY - height / 2,
@ -3400,7 +3400,7 @@ class App extends React.Component<AppProps, AppState> {
if (selectedElements[0].type === "custom") {
const config = getCustomElementConfig(
this.props.customElementsConfig,
selectedElements[0].name,
selectedElements[0].customType,
);
if (!config?.transformHandles) {
return false;