@@ -20,6 +20,8 @@ export default function App() {
2020 y : rect . top ,
2121 } , true ) ;
2222 } ) ;
23+
24+ moveableRef . current ?. updateRect ( ) ;
2325 } } > Align Top</ button >
2426 < button onClick = { ( ) => {
2527 const rect = moveableRef . current ! . getRect ( ) ;
@@ -33,6 +35,8 @@ export default function App() {
3335 y : rect . top + rect . height ,
3436 } , true ) ;
3537 } ) ;
38+
39+ moveableRef . current ?. updateRect ( ) ;
3640 } } > Align Bottom</ button >
3741 < button onClick = { ( ) => {
3842 const rect = moveableRef . current ! . getRect ( ) ;
@@ -46,6 +50,8 @@ export default function App() {
4650 x : rect . left ,
4751 } , true ) ;
4852 } ) ;
53+
54+ moveableRef . current ?. updateRect ( ) ;
4955 } } > Align Left</ button >
5056 < button onClick = { ( ) => {
5157 const rect = moveableRef . current ! . getRect ( ) ;
@@ -59,6 +65,8 @@ export default function App() {
5965 y : rect . left + rect . width ,
6066 } , true ) ;
6167 } ) ;
68+
69+ moveableRef . current ?. updateRect ( ) ;
6270 } } > Align Right</ button >
6371 < button onClick = { ( ) => {
6472 const rect = moveableRef . current ! . getRect ( ) ;
@@ -72,6 +80,8 @@ export default function App() {
7280 y : rect . top + rect . height / 2 - rect . children ! [ i ] . height / 2 ,
7381 } , true ) ;
7482 } ) ;
83+
84+ moveableRef . current ?. updateRect ( ) ;
7585 } } > Align Vertical Center</ button >
7686 < button onClick = { ( ) => {
7787 const rect = moveableRef . current ! . getRect ( ) ;
@@ -85,6 +95,8 @@ export default function App() {
8595 x : rect . left + rect . width / 2 - rect . children ! [ i ] . width / 2 ,
8696 } , true ) ;
8797 } ) ;
98+
99+ moveableRef . current ?. updateRect ( ) ;
88100 } } > Align Horizontal Center</ button >
89101 < button onClick = { ( ) => {
90102 const groupRect = moveableRef . current ! . getRect ( ) ;
@@ -110,6 +122,9 @@ export default function App() {
110122
111123 top += rect . height + gap ;
112124 } ) ;
125+
126+
127+ moveableRef . current ?. updateRect ( ) ;
113128 } } > Arrange Vertical Spacing</ button >
114129 < button onClick = { ( ) => {
115130 const groupRect = moveableRef . current ! . getRect ( ) ;
@@ -135,6 +150,8 @@ export default function App() {
135150
136151 left += rect . width + gap ;
137152 } ) ;
153+
154+ moveableRef . current ?. updateRect ( ) ;
138155 } } > Arrange Horizontal Spacing</ button >
139156 < div className = "target target1" style = { {
140157 left : "50px" ,
0 commit comments