mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-30 18:52:04 +00:00
!574 fix 1.0 inspector bugs
Merge pull request !574 from lihao71/1_inspector_bugs
This commit is contained in:
commit
0121c99d2b
@ -96,6 +96,8 @@ const char INSPECTOR_STYLES[] = "$styles";
|
||||
const char INSPECTOR_INNER_DEBUGLINE[] = "debugLine";
|
||||
const char INSPECTOR_DEBUGLINE[] = "$debugLine";
|
||||
|
||||
std::list<std::string> specialComponentNameV1 = {"dialog", "panel"};
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@ -451,6 +453,11 @@ void JsInspectorManager::ClearContainer()
|
||||
|
||||
std::string JsInspectorManager::UpdateNodeRectStrInfo(const RefPtr<AccessibilityNode> node)
|
||||
{
|
||||
auto it = std::find(specialComponentNameV1.begin(), specialComponentNameV1.end(), node->GetTag());
|
||||
if (it != specialComponentNameV1.end()) {
|
||||
node->UpdateRectWithChildRect();
|
||||
}
|
||||
|
||||
PositionInfo positionInfo = {0, 0, 0, 0};
|
||||
if (node->GetTag() == DOM_NODE_TAG_SPAN) {
|
||||
positionInfo = {
|
||||
|
@ -750,6 +750,14 @@ public:
|
||||
}
|
||||
SetZIndex(index);
|
||||
}
|
||||
|
||||
void UpdateRectWithChildRect()
|
||||
{
|
||||
if (children_.empty()) {
|
||||
return;
|
||||
}
|
||||
SetRect(children_.front()->GetRect());
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
@ -536,13 +536,6 @@ void RenderBox::OnPaintFinish()
|
||||
node->SetHeight(size.Height());
|
||||
node->SetLeft(globalOffset.GetX());
|
||||
node->SetTop(globalOffset.GetY());
|
||||
if (node->GetTag() == "inspectDialog") {
|
||||
auto parent = node->GetParentNode();
|
||||
parent->SetTop(node->GetTop());
|
||||
parent->SetLeft(node->GetLeft());
|
||||
parent->SetWidth(node->GetWidth());
|
||||
parent->SetHeight(node->GetHeight());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -546,9 +546,7 @@ RefPtr<Component> DialogComponent::GenerateComposed(
|
||||
accessibilityManager->CreateSpecializedNode(name, composedId, dialogTweenComposedId_);
|
||||
} else {
|
||||
dialogTweenComposedId_ = composedId;
|
||||
#if defined(WINDOWS_PLATFORM) || defined(MAC_PLATFORM)
|
||||
accessibilityManager->CreateSpecializedNode("inspectDialog", composedId, customDialogId_);
|
||||
#else
|
||||
#if !defined(WINDOWS_PLATFORM) && !defined(MAC_PLATFORM)
|
||||
accessibilityManager->CreateSpecializedNode(name, composedId, -1);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user