Commit 8080f3d4 authored by Michael Underwood's avatar Michael Underwood
Browse files

Make inherited `latLngs` and local `bounds` optional on Rectangle

parent f6f54fc3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
import { propsToLeafletOptions } from "../utils";
import { polygonProps, setupPolygon } from "./polygon";

polygonProps.latLngs.required = false;
export const rectangleProps = {
  ...polygonProps,
  bounds: {
    type: Array,
    required: true,
    custom: true,
  },
};
+7 −0
Original line number Diff line number Diff line
@@ -12,10 +12,17 @@
        [46.342596, -1.328731],
        [46.241487, -1.190568],
        [46.234787, -1.358337],
        [46.294733, -1.234567],
      ]"
      :fill="true"
      color="#35495d"
    />
    <l-rectangle
      :bounds="[
        [46.5, -1],
        [46.6, -1.1],
      ]"
    ></l-rectangle>
  </l-map>
</template>
<script>