From: Vaneet L. <van...@uc...> - 2023-11-27 23:41:03
|
That was the issue for me, thank you for fixing this! My dbxref links work fine now. Vaneet From: Colin <col...@gm...> Sent: Monday, November 27, 2023 3:43 PM To: Vaneet Lotay <van...@uc...> Cc: gmo...@li... Subject: Re: [Gmod-ajax] Callback function error with dbxrefs [△EXTERNAL] I made a code fix to this link https://jbrowse.org/jb2/docs/config_guides/customizing_feature_details/#example-a-generalized-solution-to-dbxrefs just yesterday after I saw this thread, the diff was old ;(typeof self !== 'undefined' ? self : window).JBrowsePluginMyPlugin = { default: Plugin, // this variable "Plugin" wasn't defined } new ;(typeof self !== 'undefined' ? self : window).JBrowsePluginMyPlugin = { default: MyPlugin, // fixed! this refers to class MyPlugin. change to DbxrefPlugin or whatever the name of your class is } On Mon, Nov 27, 2023 at 4:59 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hey Colin, Thanks I did catch that mistake for the plugin name, which I forgot to change in one place. Now I’ve got this error in the browser: TypeError: Illegal constructor. I tried to see what could be causing this but haven’t located it yet. Any ideas? Thanks, Vaneet From: Colin <col...@gm...<mailto:col...@gm...>> Sent: Sunday, November 26, 2023 8:03 PM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>> Cc: gmo...@li...<mailto:gmo...@li...> Subject: Re: [Gmod-ajax] Callback function error with dbxrefs [△EXTERNAL] Hi there I think if you copied from here https://jbrowse.org/jb2/docs/config_guides/customizing_feature_details/#example-a-generalized-solution-to-dbxrefs then also have to rename JBrowsePluginMyPlugin -> JBrowsePluginDbxrefPlugin. You can see that the error message is looking for that variable name because that is what you named it in your config.json (it looks for the name JBrowsePlugin+name from the config.json), so I think that should help -Colin Footnote: it is definitely a little tricky that you have to meticulously have the right name for the plugin in so many places. Hopefully in the future it might not require this if we switch to so called "esm plugins". ESM plugins are already supported by jbrowse 2 but some browsers don't have great support for them yet, so they aren't our default example in the documentation, but we may update our examples to them in the future On Thu, Nov 23, 2023 at 3:15 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hi all, I followed the same structure that was outlined in the docs section at jbrowse.org<http://jbrowse.org> (‘generalized solution to dbxrefs’) with different content obviously. I created a dbxrefPlugin.js file with a ‘linkout’ function under a plugin named DbxrefPlugin. When trying to load the genome for which I’m attempting to use the callback function I see this error: Failed to load UMD bundle for DbxrefPlugin, JBrowsePluginDbxrefPlugin is undefined Any idea where I’m going wrong? I can attach some code if it’s not something simple or obvious I’m missing here. Just at the preliminary stages of trying to understand how JBrowse2 functions behind the scenes, so I may have other moments like this in the future 😊 Thanks, Vaneet _______________________________________________ Gmod-ajax mailing list Gmo...@li...<mailto:Gmo...@li...> https://lists.sourceforge.net/lists/listinfo/gmod-ajax |