Skip to content

Commit

Permalink
Bump viewport-mercator-project
Browse files Browse the repository at this point in the history
  • Loading branch information
1chandu committed Sep 4, 2019
1 parent 7247583 commit 3db53c1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
39 changes: 28 additions & 11 deletions flow-typed/npm/viewport-mercator-project_vx.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,43 @@ type Viewport = {
bearing: number
};

type FlyToInterpolatorOpts = {
curve?: number,
speed?: number,
screenSpeed?: number,
maxDuraiton?: number
};

declare module 'viewport-mercator-project' {
declare export class WebMercatorViewport {
constructor(Viewport) : WebMercatorViewport;
constructor(Viewport): WebMercatorViewport;

width: number,
height: number,
longitude: number,
latitude: number,
zoom: number,
pitch: number,
bearing: number,
width: number;
height: number;
longitude: number;
latitude: number;
zoom: number;
pitch: number;
bearing: number;

project(xyz: Array<number>): Array<number>;
unproject(xyz: Array<number>): Array<number>;
getMapCenterByLngLatPosition({lngLat: Array<number>, pos: Array<number>}): Array<number>;
fitBounds(bounds: [[Number,Number],[Number,Number]], options: any): WebMercatorViewport;
fitBounds(bounds: [[Number, Number], [Number, Number]], options: any): WebMercatorViewport;
}

declare export function normalizeViewportProps(props: Viewport) : Viewport;
declare export function flyToViewport(startProps: Viewport, endProps: Viewport, t: number) : Viewport;
declare export function normalizeViewportProps(props: Viewport): Viewport;
declare export function flyToViewport(
startProps: Viewport,
endProps: Viewport,
t: number,
opts?: FlyToInterpolatorOpts
): Viewport;
declare export function getFlyToDuration(
startProps: Viewport,
endProps: Viewport,
opts?: FlyToInterpolatorOpts
): number;

declare export default typeof WebMercatorViewport;
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"publish-prod": "ocular-publish prod",
"publish-beta": "ocular-publish beta",
"test": "flow check && ocular-test",
"test-only": "ocular-test",
"test-fast": "flow check && ocular-test fast",
"metrics": "ocular-metrics",
"update-release-branch": "scripts/update-release-branch.sh"
Expand All @@ -49,7 +50,7 @@
"mjolnir.js": "^2.2.0",
"prop-types": "^15.7.2",
"react-virtualized-auto-sizer": "^1.0.2",
"viewport-mercator-project": "^6.1.0"
"viewport-mercator-project": "^6.3.0-alpha.0"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
Expand Down
1 change: 1 addition & 0 deletions src/utils/transition/transition-interpolator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow
import {equals} from '../math-utils';
import assert from '../assert';
import type {MapStateProps} from '../map-state';

export default class TransitionInterpolator {
propNames: Array<string> = [];
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9392,10 +9392,10 @@ [email protected]:
core-util-is "1.0.2"
extsprintf "^1.2.0"

viewport-mercator-project@^6.1.0:
version "6.1.1"
resolved "https://registry.yarnpkg.com/viewport-mercator-project/-/viewport-mercator-project-6.1.1.tgz#d7b2cb3cb772b819f1daab17cf4019102a9102a6"
integrity sha512-nI0GEmXnESwZxWSJuaQkdCnvOv6yckUfqqFbNB8KWVbQY3eUExVM4ZziqCVVs5mNznLjDF1auj6HLW5D5DKcng==
viewport-mercator-project@^6.3.0-alpha.0:
version "6.3.0-alpha.0"
resolved "https://registry.yarnpkg.com/viewport-mercator-project/-/viewport-mercator-project-6.3.0-alpha.0.tgz#d72e4dcfc281870a80afaf356327db48e52898f0"
integrity sha512-ZMaJC0wt12/j9LHE9WFCVvwxJ8xK9iklGHCwHiwZZ52iwwMoEQW9QeSpi/dx5PfrfekaCFn4lkpQtEamLqNSBQ==
dependencies:
"@babel/runtime" "^7.0.0"
gl-matrix "^3.0.0"
Expand Down

0 comments on commit 3db53c1

Please sign in to comment.