Better description of add + fix regression form validation + fix http server not using strokeWidth + add doc about hardcoded
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
da7f5060e8
commit
d29d1f5054
6 changed files with 24 additions and 20 deletions
|
@ -240,7 +240,7 @@ export function AddContainer(
|
|||
|
||||
// Update the state
|
||||
history.push({
|
||||
LastAction: 'Add container',
|
||||
LastAction: `Add ${type} in ${parentClone.properties.id}`,
|
||||
MainContainer: clone,
|
||||
SelectedContainer: parentClone,
|
||||
SelectedContainerId: parentClone.properties.id,
|
||||
|
|
|
@ -3,8 +3,7 @@ import { IContainerModel, ContainerModel } from '../../Interfaces/IContainerMode
|
|||
import { IHistoryState } from '../../Interfaces/IHistoryState';
|
||||
import { findContainerById } from '../../utils/itertools';
|
||||
import { getCurrentHistory } from './Editor';
|
||||
import { constraintBodyInsideUnallocatedWidth, RecalculatePhysics } from './Behaviors/RigidBodyBehaviors';
|
||||
import { INPUT_TYPES } from '../Properties/PropertiesInputTypes';
|
||||
import { RecalculatePhysics } from './Behaviors/RigidBodyBehaviors';
|
||||
import { ImposePosition } from './Behaviors/AnchorBehaviors';
|
||||
import { restoreX } from '../SVG/Elements/Container';
|
||||
|
||||
|
@ -138,8 +137,9 @@ const submitHTMLInput = (
|
|||
property: string,
|
||||
form: HTMLFormElement
|
||||
): void => {
|
||||
if (INPUT_TYPES[property] !== 'number') {
|
||||
if (input.type !== 'number') {
|
||||
(container.properties as any)[property] = input.value;
|
||||
return;
|
||||
}
|
||||
|
||||
if (property === 'x') {
|
||||
|
@ -188,7 +188,7 @@ const submitRadioButtons = (
|
|||
return;
|
||||
}
|
||||
|
||||
if (INPUT_TYPES[property] === 'number') {
|
||||
if (radiobutton.type === 'radio') {
|
||||
(container.properties as any)[property] = Number(radiobutton.value);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ export const ElementsSidebar: React.FC<IElementsSidebarProps> = (props: IElement
|
|||
</div>
|
||||
<div ref={elementRef} className='h-96 text-gray-800'>
|
||||
<List
|
||||
className='List'
|
||||
className='List divide-y divide-black'
|
||||
itemCount={containers.length}
|
||||
itemSize={35}
|
||||
height={384}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
export const INPUT_TYPES: Record<string, string> = {
|
||||
x: 'number',
|
||||
y: 'number',
|
||||
width: 'number',
|
||||
height: 'number',
|
||||
isRigidBody: 'checkbox',
|
||||
isAnchor: 'checkbox',
|
||||
XPositionReference: 'number'
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue