mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
rename name to customType
This commit is contained in:
parent
3d0a1106ff
commit
8706277d14
11 changed files with 22 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue