Closed asthomas closed 9 years ago
Fixed with pull request merge 2d64420710fa1d9b3d1571d464490181b14fadac.
Reopening after finding issue with this merge request.
Fixed in commit 8f19c10e9dbe225e3686e8656b40afc18ee8655a.
I think that splitCommaList could be reduced to:
str.split(/ *[, ] */);
The regex could be made static for speed. It would also be more correct, as it would not accept "1,,,,,2"
In this example, the regex was 4x slower: http://jsperf.com/split-join-vs-regex-replace
I don't think it makes sense to accept "1,,,2". This could mean "1,0,0,2" or "1,2" which are different for Thickness values.
That's not a representative test. Try this one: http://jsperf.com/string-split-join-split-vs-regex
In Chrome the regex performs much better. In Firefox, the regex is a little bit better.
String values for Point, Thickness, etc. can be specified as "10,10" or "10 10" in Silverlight. Fayde accepts comma, but not space.