mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-21 08:55:21 -04:00
issueNo: I477T8
Description:fix scoll bug. Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: youzhi92 <chenyouzhi@huawei.com> Change-Id: I27586969e5b610149c5c32a106df2c14dff3708d
This commit is contained in:
@@ -408,6 +408,13 @@ void Component::AlignDimensions(const ConstrainedParameter ¶m)
|
||||
OnDimensionsAligned();
|
||||
}
|
||||
|
||||
void Component::EnableTransmitSwipe()
|
||||
{
|
||||
if (onSwipeListener_ != nullptr) {
|
||||
onSwipeListener_->SetStopPropagation(false);
|
||||
}
|
||||
}
|
||||
|
||||
void Component::GetConstrainedParam(ConstrainedParameter ¶m) const
|
||||
{
|
||||
param.maxWidth = width_.value.pixel;
|
||||
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
*/
|
||||
virtual void OnViewAttached() {}
|
||||
virtual void LayoutChildren() {}
|
||||
static void BuildViewTree(Component *currComponent, Component *parent, ConstrainedParameter &alignParameter);
|
||||
static void BuildViewTree(Component *currComponent, Component *parent, ConstrainedParameter &parentParameter);
|
||||
|
||||
const Component *GetParent() const
|
||||
{
|
||||
@@ -227,6 +227,7 @@ public:
|
||||
*/
|
||||
bool AdaptBoxSizing(uint16_t attrKeyId = K_UNKNOWN) const;
|
||||
void AlignDimensions(const ConstrainedParameter ¶m);
|
||||
void EnableTransmitSwipe();
|
||||
|
||||
protected:
|
||||
void SetComponentName(uint16_t name)
|
||||
|
||||
@@ -115,6 +115,11 @@ bool ViewOnTouchCancelListener::OnCancel(UIView &view, const CancelEvent &event)
|
||||
}
|
||||
#endif // JS_TOUCH_EVENT_SUPPORT
|
||||
|
||||
void ViewOnSwipeListener::SetStopPropagation(bool isStopPropogation)
|
||||
{
|
||||
isStopPropagation_ = isStopPropogation;
|
||||
}
|
||||
|
||||
bool ViewOnSwipeListener::OnDragStart(UIView& view, const DragEvent &event)
|
||||
{
|
||||
UNUSED(view);
|
||||
|
||||
@@ -223,6 +223,7 @@ public:
|
||||
jerry_release_value(fn_);
|
||||
}
|
||||
|
||||
void SetStopPropagation(bool isStopPropogation);
|
||||
bool OnDragStart(UIView& view, const DragEvent& event) override;
|
||||
bool OnDrag(UIView& view, const DragEvent& event) override;
|
||||
bool OnDragEnd(UIView& view, const DragEvent &event) override;
|
||||
|
||||
@@ -59,7 +59,7 @@ void ScrollLayer::AppendScrollLayer(Component *rootComponent)
|
||||
HILOG_ERROR(HILOG_MODULE_ACE, "Scroll Layer: AppendScrollLayer function parameter rootComponent error.");
|
||||
return;
|
||||
}
|
||||
|
||||
rootComponent->EnableTransmitSwipe();
|
||||
uint16_t horizontalResolution = GetHorizontalResolution();
|
||||
uint16_t verticalResolution = GetVerticalResolution();
|
||||
ConstrainedParameter rootViewParam(horizontalResolution, verticalResolution);
|
||||
|
||||
Reference in New Issue
Block a user