[Gmod-ajax] "menuTemplate" placeholder examples breaks highlighting

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gmod-ajax] "menuTemplate" placeholder examples breaks highlighting

Richard Hayes
Hi,

We discovered that our use of "menuTemplate" placeholders to keep default options has broken highlighting, due to the introduction of the "Zoom" option in v1.12.3.

http://gmod.org/wiki/JBrowse_Configuration_Guide#Customizing_Right-click_Context_Menus

should be updated to reflect this:
   "menuTemplate" : [ 
        {   
         "label" : "View details",
       },  
       {   
         "label" : "Highlight this gene",
       },  
       {   
         "label" : "Open example.com in an iframe popup",
         "title" : "The magnificent example.com (feature{name})",
         "iconClass" : "dijitIconDatabase",
         "action": "iframeDialog",
         "url" : "http://www.example.com?featurename={name}"
       }   
   ]
and the jbrowse.conf equivalent need to be adjusted to
   "menuTemplate" : [ 
        {   
         "label" : "View details",
       },  
       {   
         "label" : "Zoom to this gene",
       },  
       {   
         "label" : "Highlight this gene",
       },  
       {   
         "label" : "Open example.com in an iframe popup",
         "title" : "The magnificent example.com (feature{name})",
         "iconClass" : "dijitIconDatabase",
         "action": "iframeDialog",
         "url" : "http://www.example.com?featurename={name}"
       }   
   ]
to attach all default mouse event listeners correctly. Without this change, the zoom event is attached to menu label "Highlight this gene".

Best regards,

Richard D. Hayes, Ph.D.
Joint Genome Institute / Lawrence Berkeley National Lab
http://phytozome.jgi.doe.gov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: "menuTemplate" placeholder examples breaks highlighting

Colin
That's true, I guess the message of the docs there is that just to use the placeholders to match what is needed, and so you need that placeholder for you tracks, specifically CanvasFeatures tracks since theyre the ones with that zoom feature

Note that the "Zoom to Feature" isn't a new 1.12.3 feature though, it's been around for awhile, looks like since 1.11.3 :)

Ideally, it would be better if the placeholders were not needed, but it'd require some custom code for the configuration.


-Colin

On Mon, Jun 5, 2017 at 2:53 PM, Richard Hayes <[hidden email]> wrote:
Hi,

We discovered that our use of "menuTemplate" placeholders to keep default options has broken highlighting, due to the introduction of the "Zoom" option in v1.12.3.

http://gmod.org/wiki/JBrowse_Configuration_Guide#Customizing_Right-click_Context_Menus

should be updated to reflect this:
   "menuTemplate" : [ 
        {   
         "label" : "View details",
       },  
       {   
         "label" : "Highlight this gene",
       },  
       {   
         "label" : "Open example.com in an iframe popup",
         "title" : "The magnificent example.com (feature{name})",
         "iconClass" : "dijitIconDatabase",
         "action": "iframeDialog",
         "url" : "http://www.example.com?featurename={name}"
       }   
   ]
and the jbrowse.conf equivalent need to be adjusted to
   "menuTemplate" : [ 
        {   
         "label" : "View details",
       },  
       {   
         "label" : "Zoom to this gene",
       },  
       {   
         "label" : "Highlight this gene",
       },  
       {   
         "label" : "Open example.com in an iframe popup",
         "title" : "The magnificent example.com (feature{name})",
         "iconClass" : "dijitIconDatabase",
         "action": "iframeDialog",
         "url" : "http://www.example.com?featurename={name}"
       }   
   ]
to attach all default mouse event listeners correctly. Without this change, the zoom event is attached to menu label "Highlight this gene".

Best regards,

Richard D. Hayes, Ph.D.
Joint Genome Institute / Lawrence Berkeley National Lab
http://phytozome.jgi.doe.gov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax