Skip to content

Fix _default_px function.#8

Open
jdfreder wants to merge 1 commit intojasongrout:custom-serializationfrom
jdfreder:default_px
Open

Fix _default_px function.#8
jdfreder wants to merge 1 commit intojasongrout:custom-serializationfrom
jdfreder:default_px

Conversation

@jdfreder
Copy link

No description provided.

@jasongrout
Copy link
Owner

When would value be a number? I thought all of the traits were unicode. Also, even if we have a number, shouldn't we convert it to a string and append 'px'?

@jdfreder
Copy link
Author

I'm not sure when it is a number, but that's and other non-(string|null|undefined) values are the only failing case I noticed. Maybe one/more of the widgets are using default_px on non-unicode traits when they shouldn't be.

I pass numbers through, allowing jQuery to decided what the default unit should be. When we ween the widgets from jQuery, we may want to make this explicit by returning String(number) + 'px'.

@jasongrout jasongrout force-pushed the custom-serialization branch 2 times, most recently from eef3dc4 to f53208d Compare March 27, 2015 22:25
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.

2 participants