-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add ability to set show_tracklabels=0 in config or &tracklabels=0 in url #869
Conversation
thanks . . . let me test it real quick. |
Awesome, thanks. Works great. |
In case no one noticed, using "&tracklabels=0" in the URL only works when HideTrackLabels plugin is activated. It's not a big deal since it's easy to add the plugin, but this could cause a lot of confusion and it's also a bit annoying when I want to be able to hide track labels but don't want the extra button in the toolbar. |
true, looks like this user http://gmod.827538.n3.nabble.com/Gmod-ajax-Hide-track-labels-not-working-when-nav-0-td4057922.html noted the same thing |
oh wait you mention the different issue which is that it only works when plugin loaded which is true ^_^ |
@bhofmei as a stopgap, if you just want the URL parameter to be available and no button e.g. &tracklabels=0 you could replace plugins/HideTrackLabels/js/main.js with this
|
Thanks for looking into this. I don’t mind having the button. I was just pointing this out for other users. I can imagine someone trying to use &tracklabels=0 in the URL, being confused why it doesn’t work, and having no clue that the HideTrackLabels plugin needs to be activated.
… On Jun 19, 2017, at 5:53 PM, Colin Diesh ***@***.***> wrote:
@bhofmei <https://github.com/bhofmei> as a stopgap, if you just want the URL parameter to be available and no button e.g. &tracklabels=0 you could replace plugins/HideTrackLabels/js/main.js with this
define([
'dojo/_base/declare',
'dojo/_base/lang',
'dojo/query',
'JBrowse/Plugin'
],
function(
declare,
lang,
query,
JBrowsePlugin
) {
return declare( JBrowsePlugin,
{
constructor: function( args ) {
console.log("plugin HideTracksButton constructor");
var baseUrl = this._defaultConfig().baseUrl;
var thisB = this;
var queryParams = dojo.queryToObject( window.location.search.slice(1) );
if(queryParams.tracklabels == 0 || thisB.browser.config.show_tracklabels == 0) {
thisB.browser.subscribe('/jbrowse/v1/n/tracks/redraw', function() {
query('.track-label').style('visibility', 'hidden')
})
}
}
});
});
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#869 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/APWCOqqA6NgsmfD4W6hm6pHYzt0l01-Iks5sFu3TgaJpZM4MlpzA>.
|
Addresses #868 request, but requires that the hidetracklabels plugin is enabled.