Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The CameraPadding lists all edges as being required even though the code allows them to be optional #3599

Open
simon-abbott opened this issue Aug 28, 2024 · 0 comments
Labels
bug 🪲 Something isn't working

Comments

@simon-abbott
Copy link

Mapbox Implementation

Mapbox

Mapbox Version

default

React Native Version

0.73.9

Platform

iOS, Android

@rnmapbox/maps version

10.1.30

Standalone component to reproduce

import React from "react";
import { MapView, Camera } from "@rnmapbox/maps";

const aLine = {
  type: "LineString",
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

const BugReportExample: React.FC = () => {
  return (
    <MapView style={{ flex: 1 }}>
      <Camera padding={{ paddingBottom: 10 }} />
    </MapView>
  );
};

Observed behavior and steps to reproduce

The typescript build fails because the CameraPadding type requires all four padding directions to be specified.

Expected behavior

The build should pass with only the padding directions I actually want to override.

Notes / preliminary analysis

No response

Additional links and references

No response

@simon-abbott simon-abbott added the bug 🪲 Something isn't working label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant