Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 84ba449

Browse files
fixed drag items to shape comp
1 parent 307668c commit 84ba449

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

‎client/packages/lowcoder/src/comps/comps/shapeComp/shapeTriContainer.tsx‎

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import {
2-
ContainerStyleType,
3-
} from "comps/controls/styleControlConstants";
1+
import { ContainerStyleType } from "comps/controls/styleControlConstants";
42
import { EditorContext } from "comps/editorState";
53
import { BackgroundColorContext } from "comps/utils/backgroundColorContext";
64
import { HintPlaceHolder, ScrollBar } from "lowcoder-design";
@@ -122,19 +120,24 @@ export function ShapeTriContainer(props: TriContainerProps) {
122120
}}
123121
hideScrollbar={!scrollbars}
124122
>
125-
<div style={{ position: "relative" }}>
123+
<div style={{ position: "relative", height: "100%" }}>
124+
<Coolshape
125+
type={shape?.value as any}
126+
index={shape.index}
127+
styles={{
128+
position: "absolute",
129+
top: "0",
130+
left: "50%",
131+
transform: "translateX(-50%)",
132+
}}
133+
/>
126134
<BodyInnerGrid
127-
$showBorder={showHeader}
135+
$showBorder={false}
128136
{...otherBodyProps}
129137
items={gridItemCompToGridItems(bodyItems)}
130138
autoHeight={container.autoHeight}
131139
emptyRows={14}
132-
minHeight={showHeader ? "143px" : "142px"}
133-
containerPadding={
134-
(showHeader && showFooter) || showHeader
135-
? [paddingWidth, 11.5]
136-
: [paddingWidth, 11]
137-
}
140+
minHeight={"142px"}
138141
hintPlaceholder={props.hintPlaceholder ?? HintPlaceHolder}
139142
$backgroundColor={bodyStyle?.background || "transparent"}
140143
$borderColor={style?.border}
@@ -145,20 +148,9 @@ export function ShapeTriContainer(props: TriContainerProps) {
145148
$backgroundImagePosition={bodyStyle?.backgroundImagePosition}
146149
$backgroundImageOrigin={bodyStyle?.backgroundImageOrigin}
147150
style={{
148-
padding: bodyStyle.containerBodyPadding,
149151
zIndex: 999,
150152
}}
151153
/>
152-
<Coolshape
153-
type={shape?.value as any}
154-
index={shape.index}
155-
styles={{
156-
position: "absolute",
157-
top: "0",
158-
left: "50%",
159-
transform: "translateX(-50%)",
160-
}}
161-
/>
162154
</div>
163155
</ScrollBar>
164156
</BackgroundColorContext.Provider>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /