GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(mobile): SVG markers with orient="auto-start-reverse" no longer c… · adampeterhiggins/t3code@47e336b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • patches
    • [email protected]
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎patches/[email protected]‎

Copy file name to clipboard
+40Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
diff --git a/android/src/main/java/com/horcrux/svg/MarkerView.java b/android/src/main/java/com/horcrux/svg/MarkerView.java
2+
index 8c796236f9f4b58717ac3fbab65e33d11ba032f2..d886e13d2cd1390a396716ecf4a379205e6a8aeb 100644
3+
--- a/android/src/main/java/com/horcrux/svg/MarkerView.java
4+
+++ b/android/src/main/java/com/horcrux/svg/MarkerView.java
5+
@@ -114,6 +114,17 @@ class MarkerView extends GroupView {
6+
}
7+
}
8+
9+
+ private static double parseOrientAngle(String orient) {
10+
+ if (orient == null) {
11+
+ return 0;
12+
+ }
13+
+ try {
14+
+ return Double.parseDouble(orient);
15+
+ } catch (NumberFormatException e) {
16+
+ return 0;
17+
+ }
18+
+ }
19+
+
20+
void renderMarker(
21+
Canvas canvas, Paint paint, float opacity, RNSVGMarkerPosition position, float strokeWidth) {
22+
int count = saveAndSetupCanvas(canvas, mCTM);
23+
@@ -122,8 +133,15 @@ class MarkerView extends GroupView {
24+
Point origin = position.origin;
25+
markerTransform.setTranslate((float) origin.x, (float) origin.y);
26+
27+
- double markerAngle = "auto".equals(mOrient) ? -1 : Double.parseDouble(mOrient);
28+
- float degrees = 180 + (float) (markerAngle == -1 ? position.angle : markerAngle);
29+
+ double markerAngle = position.angle;
30+
+ if ("auto-start-reverse".equals(mOrient)) {
31+
+ if (position.type == RNSVGMarkerType.kStartMarker) {
32+
+ markerAngle += 180;
33+
+ }
34+
+ } else if (!"auto".equals(mOrient)) {
35+
+ markerAngle = parseOrientAngle(mOrient);
36+
+ }
37+
+ float degrees = 180 + (float) markerAngle;
38+
markerTransform.preRotate(degrees);
39+
40+
boolean useStrokeWidth = "strokeWidth".equals(mMarkerUnits);
Collapse file

‎pnpm-lock.yaml‎

Copy file name to clipboardExpand all lines: pnpm-lock.yaml
+12-10Lines changed: 12 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎pnpm-workspace.yaml‎

Copy file name to clipboardExpand all lines: pnpm-workspace.yaml
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ overrides:
125125
react-native-keyboard-controller: 1.22.8
126126
react-native-pdf-jsi: 5.0.0
127127
react-native-webview: 14.0.1
128+
react-native-svg: 15.16.0
128129
"@expo/ui": 58.0.20
129130
"@expo/fingerprint": 0.21.5
130131
app-builder-lib: 26.16.1
@@ -265,6 +266,8 @@ patchedDependencies:
265266
[email protected]: patches/[email protected]
266267
# A failed Artifacts.cached effect hangs every later caller: https://github.com/alchemy-run/alchemy/issues/2981
267268
[email protected]: patches/[email protected]
269+
# Android: a marker orient other than "auto" or a number (auto-start-reverse) no longer throws.
270+
[email protected]: patches/[email protected]
268271

269272
# Unmet peers fail resolution, so a pin outside a dependency's peer range is
270273
# caught when the lockfile changes instead of scrolling past as a warning.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.