File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
harmony/spring_scrollview/src/main/cpp Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -224,8 +224,11 @@ void SpringScrollViewComponentInstance::onStateChanged(SharedConcreteState const
224
224
float tempHeight = (stateData.getContentSize ().height < m_layoutMetrics.frame .size .height )
225
225
? m_layoutMetrics.frame .size .height
226
226
: stateData.getContentSize ().height ;
227
+ float tempWidth = (stateData.getContentSize ().width < m_layoutMetrics.frame .size .width )
228
+ ? m_layoutMetrics.frame .size .width
229
+ : stateData.getContentSize ().width ;
227
230
this ->getLocalRootArkUINode ().setContentSize (
228
- {static_cast < float >(stateData. getContentSize (). width ), static_cast < float >( tempHeight) });
231
+ {tempWidth, tempHeight});
229
232
DLOG (INFO) << " SpringScrollViewComponentInstance onStateChanged content_h:" << stateData.getContentSize ().height
230
233
<< " content_w:" << stateData.getContentSize ().width << " h:" <<m_layoutMetrics.frame .size .height << " w:" << m_layoutMetrics.frame .size .width ;
231
234
if (!this ->firstShowUI ){
You can’t perform that action at this time.
0 commit comments