@react-native-ohos/react-native-svg 15.12.1-rc.7 → 15.12.1-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
name: '@react-native-ohos/react-native-svg',
|
|
7
7
|
type: 'module',
|
|
8
8
|
main: 'index.ets',
|
|
9
|
-
version: '15.12.1-rc.
|
|
9
|
+
version: '15.12.1-rc.9',
|
|
10
10
|
dependencies: {
|
|
11
11
|
"@rnoh/react-native-openharmony": "file:../../node_modules/@react-native-oh/react-native-harmony/harmony/react_native_openharmony.har"
|
|
12
12
|
},
|
|
@@ -70,6 +70,7 @@ void SvgGradient::SetAttrRy(const std::string& ry) {
|
|
|
70
70
|
|
|
71
71
|
void SvgGradient::SetAttrGradient(std::vector<Float> gradient) {
|
|
72
72
|
auto stopCount = gradient.size() / 2;
|
|
73
|
+
gradientAttr_.gradient.ClearColors();
|
|
73
74
|
for (auto i = 0; i < stopCount; i++) {
|
|
74
75
|
auto stopIndex = i * 2;
|
|
75
76
|
GradientColor gradientColor;
|
|
@@ -105,21 +105,28 @@ void ImageSourceResolver::imageDownloadComplete(std::string uri, std::string fil
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
void ImageSourceResolver::imageDownloadFail(std::string uri) {
|
|
108
|
-
|
|
109
|
-
if (pend != m_pendingSet.end()) {
|
|
110
|
-
m_pendingSet.erase(uri);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
auto it = m_uriListenersMap.find(uri);
|
|
114
|
-
if (it == m_uriListenersMap.end()) {
|
|
108
|
+
if (uri.empty()) {
|
|
115
109
|
return;
|
|
116
110
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
if (!m_pendingSet.empty()) {
|
|
112
|
+
auto pend = m_pendingSet.find(uri);
|
|
113
|
+
if (pend != m_pendingSet.end()) {
|
|
114
|
+
m_pendingSet.erase(uri);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (!m_uriListenersMap.empty()) {
|
|
118
|
+
auto it = m_uriListenersMap.find(uri);
|
|
119
|
+
if (it == m_uriListenersMap.end()) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
auto &listeners = it->second;
|
|
123
|
+
for (auto listener : listeners) {
|
|
124
|
+
auto weaklistener = listener.lock();
|
|
125
|
+
if (weaklistener) {
|
|
126
|
+
weaklistener->onImageSourceCacheDownloadFileFail();
|
|
127
|
+
removeListenerForURI(uri, weaklistener);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
123
130
|
}
|
|
124
131
|
}
|
|
125
132
|
|
package/harmony/svg.har
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-ohos/react-native-svg",
|
|
3
|
-
"version": "15.12.1-rc.
|
|
3
|
+
"version": "15.12.1-rc.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"react-native": "src/index",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"react-native-svg": "15.12.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@rnoh/react-native-harmony-cli": "./packages/react-native-oh-react-native-harmony-cli-0.77.18.tgz",
|
|
24
25
|
"@react-native-community/cli": "15.0.1",
|
|
25
26
|
"@tsconfig/react-native": "^3.0.0",
|
|
26
27
|
"@types/jest": "^29.5.1",
|