add comments, format, lint fix
This commit is contained in:
@@ -22,6 +22,10 @@ class ExpoBlueskyContextMenuView: ExpoView, UIContextMenuInteractionDelegate {
|
|||||||
self.addInteraction(interaction)
|
self.addInteraction(interaction)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RN layout can leave bounds at fractional-pixel values. The targeted preview
|
||||||
|
// snapshots this view's bounds for its return animation, and subpixel mismatches
|
||||||
|
// cause a visible glitch when the preview shrinks back into the thumbnail.
|
||||||
|
// Snapping to whole-pixel values prevents that.
|
||||||
override var bounds: CGRect {
|
override var bounds: CGRect {
|
||||||
get {
|
get {
|
||||||
let b = super.bounds
|
let b = super.bounds
|
||||||
|
|||||||
@@ -67,4 +67,3 @@ enum IconRenderer {
|
|||||||
return CGRect(x: parts[0], y: parts[1], width: parts[2], height: parts[3])
|
return CGRect(x: parts[0], y: parts[1], width: parts[2], height: parts[3])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ import UIKit
|
|||||||
|
|
||||||
/// Minimal SVG path `d` parser. Handles the subset used by Bluesky's icon set:
|
/// Minimal SVG path `d` parser. Handles the subset used by Bluesky's icon set:
|
||||||
/// M m L l H h V v C c S s Q q T t A a Z z.
|
/// M m L l H h V v C c S s Q q T t A a Z z.
|
||||||
|
/// Assumes well-formed input from the app's own compiled-in icon paths.
|
||||||
enum SVGPathParser {
|
enum SVGPathParser {
|
||||||
static func parse(_ d: String) -> UIBezierPath {
|
static func parse(_ d: String) -> UIBezierPath {
|
||||||
let path = UIBezierPath()
|
let path = UIBezierPath()
|
||||||
var tokens = Tokenizer(d)
|
var tokens = Tokenizer(d)
|
||||||
var currentPoint = CGPoint.zero
|
var currentPoint = CGPoint.zero
|
||||||
var subpathStart = CGPoint.zero
|
var subpathStart = CGPoint.zero
|
||||||
var lastControl: CGPoint? = nil
|
var lastControl: CGPoint?
|
||||||
var lastQuadControl: CGPoint? = nil
|
var lastQuadControl: CGPoint?
|
||||||
var command: Character = "M"
|
var command: Character = "M"
|
||||||
|
|
||||||
while let next = tokens.peek() {
|
while let next = tokens.peek() {
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
import {forwardRef, type ForwardRefExoticComponent, type RefAttributes} from 'react'
|
import {
|
||||||
|
forwardRef,
|
||||||
|
type ForwardRefExoticComponent,
|
||||||
|
type RefAttributes,
|
||||||
|
} from 'react'
|
||||||
import Svg, {Path} from 'react-native-svg'
|
import Svg, {Path} from 'react-native-svg'
|
||||||
|
|
||||||
import {type Props, useCommonSVGProps} from '#/components/icons/common'
|
import {type Props, useCommonSVGProps} from '#/components/icons/common'
|
||||||
@@ -120,4 +124,3 @@ export function createMultiPathSVG({
|
|||||||
Icon.svgStrokeWidth = 0
|
Icon.svgStrokeWidth = 0
|
||||||
return Icon
|
return Icon
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user