横方向のアニメーションや要素の被りを修正

This commit is contained in:
harukin-OneMix4
2024-02-12 21:51:35 +09:00
parent bf2b4d356c
commit c45c58cc64
3 changed files with 108 additions and 20 deletions

View File

@@ -52,7 +52,7 @@ export const EachTrainInfoCore = ({
currentTrain.filter((d) => d.num == data.trainNum)
)
);
}, [currentTrain]);
}, [currentTrain, data.trainNum]);
//bconst insets = useSafeAreaInsets();
@@ -232,7 +232,9 @@ export const EachTrainInfoCore = ({
setNearTrainIDList(returnArray);
setShowNearTrain(TDArray);
}, [data]);
const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef);
const scrollHandlers = actionSheetRef
? useScrollHandlers("scrollview-1", actionSheetRef)
: null;
const migrateTrainName = (string) => {
return string
.replace("マリン", "マリンライナー")
@@ -401,18 +403,20 @@ export const EachTrainInfoCore = ({
borderWidth: 1,
}}
>
<View style={{ height: 26, width: "100%" }}>
<View
style={{
height: 6,
width: 45,
borderRadius: 100,
backgroundColor: "#f0f0f0",
marginVertical: 10,
alignSelf: "center",
}}
/>
</View>
{isLandscape || (
<View style={{ height: 26, width: "100%" }}>
<View
style={{
height: 6,
width: 45,
borderRadius: 100,
backgroundColor: "#f0f0f0",
marginVertical: 10,
alignSelf: "center",
}}
/>
</View>
)}
<View style={{ padding: 10, flexDirection: "row", alignItems: "center" }}>
<Text style={{ fontSize: 20, fontWeight: "bold", color: "white" }}>
{data.limited
@@ -450,7 +454,8 @@ export const EachTrainInfoCore = ({
/>
)}
</View>
{isLandscape ? (
{/* {isLandscape */}
{false ? (
<LandscapeTrainInfo
scrollHandlers={scrollHandlers}
leftContent={
@@ -552,7 +557,11 @@ export const EachTrainInfoCore = ({
styles={styles}
scrollViewProps={scrollHandlers}
containerProps={{
style: { maxHeight: heightPercentageToDP("70%") },
style: {
maxHeight: isLandscape
? height - 94
: heightPercentageToDP("70%"),
},
}}
Max_Header_Height={from == "AllTrainDiagramView" ? 0 : 200}
Min_Header_Height={from == "AllTrainDiagramView" ? 0 : 80}