Movatterモバイル変換


[0]ホーム

URL:


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

Commit03d2442

Browse files
reduce delay in height calculation
1 parent03478a5 commit03d2442

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

‎client/packages/lowcoder/src/comps/utils/useCompInstance.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ export function useCompInstance<T extends CompConstructor>(
304304

305305
letupdateHandler=()=>setComp(container.comp);
306306

307-
if(UPDATE_ROOT_VIEW_DEBOUNCE>0){
307+
//if (UPDATE_ROOT_VIEW_DEBOUNCE > 0) {
308308
updateHandler=debounce(()=>{
309309
setComp(container.comp);
310-
},UPDATE_ROOT_VIEW_DEBOUNCE);
311-
}
310+
},50/*UPDATE_ROOT_VIEW_DEBOUNCE */);
311+
//}
312312

313313
constfinalHandlers=[...(handlers||[]),updateHandler];
314314
finalHandlers.forEach((handler)=>container.addChangeListener(handler));

‎client/packages/lowcoder/src/layout/compSelectionWrapper.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ export const CompSelectionWrapper = React.memo((props: {
343343
});
344344
// log.debug("CompSelectionWrapper. name: ", props.name, " zIndex: ", zIndex);
345345
const{ nameConfig, resizeIconSize}=props;
346+
346347
return(
347348
<divid={props.id}style={{ ...props.style, zIndex}}className={props.className}>
348349
<SelectableDiv
@@ -400,7 +401,7 @@ export const CompSelectionWrapper = React.memo((props: {
400401
||props.compType==='container'
401402
}
402403
refreshMode="debounce"
403-
refreshRate={100}
404+
refreshRate={0}
404405
onResize={props.onInnerResize}
405406
observerOptions={{box:"border-box"}}
406407
>

‎client/packages/lowcoder/src/layout/gridItem.tsx‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,6 @@ const ResizableStyled = styled(Resizable)<{ $zIndex: number, isDroppable : boole
104104
*/
105105
exportconstGridItem=React.memo((props:GridItemProps)=>{
106106
constposition=useMemo(()=>{
107-
console.log('calculateGridItemPOistion',JSON.stringify({
108-
name:props.name,
109-
margin:props.margin,
110-
containerPadding:props.containerPadding,
111-
containerWidth:props.containerWidth,
112-
cols:props.cols,
113-
rowHeight:props.rowHeight,
114-
maxRows:props.maxRows,
115-
x:props.x,
116-
y:props.y,
117-
w:props.w,
118-
h:props.h,
119-
}));
120107
returncalcGridItemPosition({
121108
margin:props.margin,
122109
containerPadding:props.containerPadding,

‎client/packages/lowcoder/src/layout/utils.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ export function setTransform(
207207
hidden?:boolean,
208208
isDragging?:boolean,
209209
):Record<string,any>{
210-
console.log(name,{top, left, width, height})
211210
// Replace unitless items with px
212211
consttranslate=`translate(${left}px,${top}px)`;
213212
functioncontainsChart(str:string){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp