mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
Adds Windows support. Co-authored-by: Adam Gleitman <adam.gleitman@gmail.com> Co-authored-by: REDMOND\agnel <agnel@microsoft.com>
33 lines
1.0 KiB
C++
33 lines
1.0 KiB
C++
#include "pch.h"
|
|
#include "SymbolViewManager.h"
|
|
#include "SymbolViewManager.g.cpp"
|
|
|
|
using namespace winrt;
|
|
using namespace Microsoft::ReactNative;
|
|
|
|
namespace winrt::RNSVG::implementation
|
|
{
|
|
SymbolViewManager::SymbolViewManager() {
|
|
m_class = RNSVG::SVGClass::RNSVGSymbol;
|
|
m_name = L"RNSVGSymbol";
|
|
}
|
|
|
|
IMapView<hstring, ViewManagerPropertyType> SymbolViewManager::NativeProps() {
|
|
auto const &parentProps{__super::NativeProps()};
|
|
auto const &nativeProps{winrt::single_threaded_map<hstring, ViewManagerPropertyType>()};
|
|
|
|
for (auto const &prop : parentProps) {
|
|
nativeProps.Insert(prop.Key(), prop.Value());
|
|
}
|
|
|
|
nativeProps.Insert(L"minX", ViewManagerPropertyType::Number);
|
|
nativeProps.Insert(L"minY", ViewManagerPropertyType::Number);
|
|
nativeProps.Insert(L"vbWidth", ViewManagerPropertyType::Number);
|
|
nativeProps.Insert(L"vbHeight", ViewManagerPropertyType::Number);
|
|
nativeProps.Insert(L"align", ViewManagerPropertyType::String);
|
|
nativeProps.Insert(L"meetOrSlice", ViewManagerPropertyType::Number);
|
|
|
|
return nativeProps.GetView();
|
|
}
|
|
}
|