{CadError.ALGORITHM_ERROR_KINDS.includes(error.kind) &&
performing operation with current parameters leads to an invalid object
(self-intersecting / zero-thickness / complete degeneration or unsupported cases)
}
{error.code && {error.code}
}
{error.userMessage && {error.userMessage}
}
{!error.userMessage && internal error processing operation, check the log
}
}
>
;
}
onKeyDown = e => {
switch (e.keyCode) {
case 27 :
this.cancel();
break;
case 13 :
this.onOK();
break;
}
};
focusFirstInput = el => {
if (this.props.noFocus) {
return;
}
let toFocus = el.querySelector('input, select');
if (!toFocus) {
toFocus = el;
}
toFocus.focus();
};
cancel = () => {
this.props.onCancel();
};
onOK = () => {
this.props.onOK();
};
}