| 1635 | auto& attributeIds = viewNode->getAttributeIds(); |
| 1636 | auto opacityId = attributeIds.getIdForName("opacity"); |
| 1637 | auto translationYId = attributeIds.getIdForName("translationY"); |
| 1638 | auto scaleXId = attributeIds.getIdForName("scaleX"); |
| 1639 | auto scaleYId = attributeIds.getIdForName("scaleY"); |
| 1640 | |
| 1641 | viewNodeTree->withLock([&]() { |
| 1642 | auto& viewTransactionScope = viewNodeTree->getCurrentViewTransactionScope(); |
| 1643 | if (static_cast<bool>(hasOpacity)) { |
| 1644 | viewNode->setAttribute(viewTransactionScope, opacityId, attributeOwner, Valdi::Value(opacity), nullptr); |
| 1645 | } else { |
| 1646 | viewNode->setAttribute(viewTransactionScope, opacityId, attributeOwner, Valdi::Value::undefined(), nullptr); |
| 1647 | } |
| 1648 | |
| 1649 | if (static_cast<bool>(hasTransform)) { |
| 1650 | viewNode->setAttribute( |
| 1651 | viewTransactionScope, translationYId, attributeOwner, Valdi::Value(translationY), nullptr); |
| 1652 | viewNode->setAttribute(viewTransactionScope, scaleXId, attributeOwner, Valdi::Value(scale), nullptr); |