igvteam/igv.js

Default cnvpytor track height

Closed this issue · 4 comments

The recent change for configuration setup is affecting the default height for cnvpytor track.

The issue lies in the following code, which is not functioning as intended:

static DEFAULT_TRACK_HEIGHT = 250
...
...
this.height = (config.height !== undefined ? config.height : CNVPytorTrack.DEFAULT_TRACK_HEIGHT)

However, when modified to the following code, it works properly:

config.height = (config.height !== undefined ? config.height : CNVPytorTrack.DEFAULT_TRACK_HEIGHT)

The question arises: should the change be made from this.height to config.height? I'm unsure which approach is correct in this context.

Thanks
-Arijit

Which "recent change" are you referring to?

Also, where is the code you are referencing, I need some context.

I'm uncertain about which commit caused the this.height assignment to fail in setting the track height. This issue is impacting the subsequent line in the CNVpytor track.

this.height = (config.height !== undefined ? config.height : CNVPytorTrack.DEFAULT_TRACK_HEIGHT)

OK I found it, see the commit. This convention is used for simple properties that are override-able in the config.