dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
227 stars 68 forks source link

Check for boolean values of LABEL/BUMP #27

Closed KimJBaran closed 11 years ago

KimJBaran commented 11 years ago

This is a bugfix. The feature tier only checked for the mere presence of the boolean parameters LABEL and BUMP. This would cause them to be interpreted as true when they were explicitly set to 'no' (false).

The fix checks explicitly for the value 'yes'. According to DAS spec 1.6, the values can only be either 'yes' or 'no', so I am not handling case sensitivity here.

dasmoth commented 11 years ago

Real issue, and thanks for the patch, but I think it's possible that this solution may be a little too stringent. We'll see if it causes any issues "in the wild", but my suspicion is that we should probably also accept "true" -- I know I've made that mistake in the past when writing stylesheets, and pretty sure I'm not the only one.

KimJBaran commented 11 years ago

Good point. Adding at least 'true' as another acceptable argument sounds convincing.

dasmoth commented 11 years ago

Could you try the latest version please https://github.com/dasmoth/dalliance/commit/69e07be71cd9421e69539b42263c8a19e0570f48

dasmoth commented 11 years ago

Sorry, that's the wrong link. New revision checked in but not showing in the github UI yet for some reason. Search for feature-tier.js:isDasBooleanTrue function and all should be clear.