Skip to content

Commit 6a8e64e

Browse files
authored
Revert "Add a magnifying glass example (#2419)" (#2483)
This reverts commit 391fb9a.
1 parent cf226be commit 6a8e64e

File tree

8 files changed

+1
-218
lines changed

8 files changed

+1
-218
lines changed

example/src/App.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
Aurora,
1515
Breathe,
1616
Filters,
17-
MagnifyingGlass,
1817
Gooey,
1918
GraphsScreen,
2019
Hue,
@@ -45,7 +44,6 @@ const linking: LinkingOptions<StackParamList> = {
4544
API: "api",
4645
Breathe: "breathe",
4746
Filters: "filters",
48-
MagnifyingGlass: "magnifying-glass",
4947
Gooey: "gooey",
5048
Hue: "hue",
5149
Matrix: "matrix",
@@ -129,7 +127,6 @@ const App = () => {
129127
<Stack.Screen name="API" component={API} />
130128
<Stack.Screen name="Breathe" component={Breathe} />
131129
<Stack.Screen name="Filters" component={Filters} />
132-
<Stack.Screen name="MagnifyingGlass" component={MagnifyingGlass} />
133130
<Stack.Screen name="Gooey" component={Gooey} />
134131
<Stack.Screen name="Hue" component={Hue} />
135132
<Stack.Screen

example/src/Examples/Examples.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { Matrix } from "./Matrix";
1616
import { Hue } from "./Hue";
1717
import { Glassmorphism } from "./Glassmorphism";
1818
import { Filters } from "./Filters";
19-
import { MagnifyingGlass } from "./MagnifyingGlass";
2019

2120
it("should render the Breathe example correctly", () => {
2221
render(<Breathe />);
@@ -70,8 +69,4 @@ it("should render the Filter example correctly", () => {
7069
render(<Filters />);
7170
});
7271

73-
it("should render the MagnifyingGlass example correctly", () => {
74-
render(<MagnifyingGlass />);
75-
});
76-
7772
afterEach(cleanup);

example/src/Examples/MagnifyingGlass/MagnifyingGlass.tsx

Lines changed: 0 additions & 193 deletions
This file was deleted.

example/src/Examples/MagnifyingGlass/index.tsx

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/src/Examples/SpeedTest/Slider.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ interface Props {
1414
onValueChange: (value: number) => void;
1515
minValue: number;
1616
maxValue: number;
17-
initialValue?: number;
1817
}
1918

2019
const size = 32;
@@ -28,21 +27,14 @@ export const Slider: React.FC<Props> = ({
2827
onValueChange,
2928
minValue,
3029
maxValue,
31-
initialValue = minValue,
3230
}) => {
3331
const { width } = useWindowDimensions();
3432

3533
const sliderWidth = width / 2;
3634
const pickerR = size / 2;
3735
const progressBarHeight = 3;
3836

39-
const initialTranslateX = interpolate(
40-
initialValue,
41-
[minValue, maxValue],
42-
[-pickerR, sliderWidth - pickerR]
43-
);
44-
45-
const translateX = useSharedValue(initialTranslateX);
37+
const translateX = useSharedValue(-pickerR);
4638
const contextX = useSharedValue(0);
4739
const scale = useSharedValue(1);
4840

example/src/Examples/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export * from "./Reanimated";
22
export * from "./API";
33
export * from "./Breathe";
44
export * from "./Filters";
5-
export * from "./MagnifyingGlass";
65
export * from "./Gooey";
76
export * from "./Matrix";
87
export * from "./Graphs";

example/src/Home/HomeScreen.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ export const HomeScreen = () => {
2727
description="Simple Image Filters"
2828
route="Filters"
2929
/>
30-
<HomeScreenButton
31-
title="🔍 Magnifying Glass"
32-
description="Magnifying glass filter"
33-
route="MagnifyingGlass"
34-
/>
3530
<HomeScreenButton
3631
title="🟣 Gooey Effect"
3732
description="Simple Gooey effect"

example/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export type StackParamList = {
88
API: undefined;
99
Breathe: undefined;
1010
Filters: undefined;
11-
MagnifyingGlass: undefined;
1211
Gooey: undefined;
1312
Hue: undefined;
1413
Matrix: undefined;

0 commit comments

Comments
 (0)