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

Fix Layer#checkProp to only error on undefined/null #39

Merged
merged 2 commits into from Jul 1, 2016

Conversation

austinhyde
Copy link
Contributor

Fixes #31

I added unit tests confirming this behavior, but there's still a test failure on

⨯ Viewport projection matrix
  not ok 7 TypeError: viewport.getZoomedViewProjectionMatrix is not a function
    ---
      operator: error
      expected: 
      actual:   {}
      at: Test.exports.Test.run (/Users/Hyde/src/deck.gl/node_modules/tape-catch/index.js:29:10)
      stack:
        TypeError: viewport.getZoomedViewProjectionMatrix is not a function
          at Test._cb (viewport-spec.js:55:39)

I'm not sure the best solution to this, so I just left it as-is.

t.end();
});

test('Layer#constructor with missing prps', t => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prps => props

@ibgreen
Copy link
Collaborator

ibgreen commented Jul 1, 2016

@austinhyde
Looks great
Love the fact that you added unit tests!
I think the breaking function has just changed name to getProjectionMatrix(). You can make the change, or leave it and I'll fix it later.
I added some inline nits, but they are not blockers, I am fine to merge this as is.
Let's chat offline if you need a new version published.

@ibgreen ibgreen merged commit bc02fc9 into visgl:dev Jul 1, 2016
@austinhyde
Copy link
Contributor Author

I wasn't able to fix the projection matrix test - the expected data doesn't line up with the results from getProjectionMatrix():

// actual
[
  7.816546440124512, -5.682946681976318, -1.9806208610534668, -1.808401107788086,
  -7.678424835205078, -5.785172939300537, -2.0162487030029297, -1.8409311771392822,
  0, 7.7417097091674805, -2.9606006145477295, -2.703169345855713,
  879.8411865234375, 1610.45068359375, 562.7077026367188, 513.97021484375
]
// expected
[
  0.0026987954042851925, -0.001962133916094899, -0.0006838429835624993, -0.0006243811803869903,
  -0.0026511065661907196, -0.0019974291790276766, -0.0006961441249586642, -0.0006356127560138702,
  0, 0.0026729567907750607, -0.001022197655402124, -0.0009333151392638683,
  879.8411865234375, 1610.45068359375, 562.7077026367188, 513.97021484375
]

@ibgreen
Copy link
Collaborator

ibgreen commented Jul 1, 2016

I see. Yes, the projection has changed scale, I'll handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants