How to use the viewport-mercator-project/viewport function in viewport-mercator-project

To help you get started, we’ve selected a few viewport-mercator-project examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber-archive / viewport-mercator-project / test / spec / viewport.spec.js View on Github external
test('Viewport#equals', t => {
  const viewport1 = new Viewport(TEST_DATA.viewport);
  const viewport2 = new Viewport(TEST_DATA.viewport);
  const viewport3 = new Viewport(Object.assign({}, TEST_DATA.viewport, {height: 33}));

  t.ok(viewport1.equals(viewport1),
    'Viewport equality correct');
  t.ok(viewport1.equals(viewport2),
    'Viewport equality correct');
  t.notOk(viewport1.equals(viewport3),
    'Viewport equality correct');
  t.end();
});
github uber-archive / viewport-mercator-project / test / spec / viewport.spec.js View on Github external
test('Viewport#equals', t => {
  const viewport1 = new Viewport(TEST_DATA.viewport);
  const viewport2 = new Viewport(TEST_DATA.viewport);
  const viewport3 = new Viewport(Object.assign({}, TEST_DATA.viewport, {height: 33}));

  t.ok(viewport1.equals(viewport1),
    'Viewport equality correct');
  t.ok(viewport1.equals(viewport2),
    'Viewport equality correct');
  t.notOk(viewport1.equals(viewport3),
    'Viewport equality correct');
  t.end();
});
github uber-archive / viewport-mercator-project / test / spec / viewport.spec.js View on Github external
test('Viewport#constructor', t => {
  t.ok(new Viewport() instanceof Viewport,
    'Created new Viewport with default args');
  t.ok(new Viewport(TEST_DATA.viewport) instanceof Viewport,
    'Created new Viewport with test args');
  t.end();
});
github uber-archive / viewport-mercator-project / test / spec / viewport.spec.js View on Github external
test('Viewport#constructor - 0 width/height', t => {
  const viewport = new Viewport(Object.assign({}, TEST_DATA.viewport, {
    width: 0,
    height: 0
  }));
  t.ok(viewport instanceof Viewport,
    'Viewport constructed successfully with 0 width and height');
  t.end();
});
github uber-archive / viewport-mercator-project / test / spec / viewport.spec.js View on Github external
test('Viewport#equals', t => {
  const viewport1 = new Viewport(TEST_DATA.viewport);
  const viewport2 = new Viewport(TEST_DATA.viewport);
  const viewport3 = new Viewport(Object.assign({}, TEST_DATA.viewport, {height: 33}));

  t.ok(viewport1.equals(viewport1),
    'Viewport equality correct');
  t.ok(viewport1.equals(viewport2),
    'Viewport equality correct');
  t.notOk(viewport1.equals(viewport3),
    'Viewport equality correct');
  t.end();
});
github uber-archive / viewport-mercator-project / test / spec / viewport.spec.js View on Github external
test('Viewport#constructor', t => {
  t.ok(new Viewport() instanceof Viewport,
    'Created new Viewport with default args');
  t.ok(new Viewport(TEST_DATA.viewport) instanceof Viewport,
    'Created new Viewport with test args');
  t.end();
});