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

Uses new computed property syntax w/ polyfill for host apps running older ember #63

Merged
merged 1 commit into from
Jun 4, 2015

Conversation

@jayphelps
Copy link
Member Author

There seems to be an issue with the dummy app, investigating. Don't merge yet.

@jayphelps
Copy link
Member Author

OK fixed. Issue was caused by scale setter not defaulting if the cast value was NaN. https://github.com/Netflix/ember-nf-graph/pull/63/files#diff-a41a06eff671679579fa51f5381ad41eR99

 scaleOffsetY: computed({
   get() {
     return this._scaleOffsetY || 0;
   },
   set(key, value) {
     return this._scaleOffsetY = +value || 0;
   }
 })

I actually don't think storing the value in a private _scaleOffsetY, etc is necessary? It just adds to the confusion of "when is ember memoizing" vs. "when is the getter actually being called". In this case, it was memoized as NaN.

@jayphelps
Copy link
Member Author

@Blesh I'm gonna go ahead and merge tonight if I don't hear otherwise from you 😋

@benlesh
Copy link
Contributor

benlesh commented Jun 4, 2015

Sorry... this was a big PR, I started looking at it, but got pulled into something else.

benlesh added a commit that referenced this pull request Jun 4, 2015
Uses new computed property syntax w/ polyfill for host apps running older ember
@benlesh benlesh merged commit a859f76 into Netflix:master Jun 4, 2015
@jayphelps
Copy link
Member Author

🎉 Thanks dudebro.

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