We're Hiring!

Maximize Screen button - left panel options - web

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: Maximize Screen button - left panel options - web

Postby wmoore » Wed Jun 08, 2016 11:23 am

Hi Jonathan,

OK, so repeated and fixed the bug with the zoom buttons https://github.com/openmicroscopy/openm ... /pull/4701
Thanks (and apologies) for that.
NB: that PR hasn't yet been tested by the team or merged so you may want to wait for that or keep an eye on the PR?

I also added a workaround to the example at
http://will-moore.github.io/weblabs/image_viewer_demo/
(commit at https://github.com/will-moore/weblabs/c ... 617f77c62b).

The minified js file is generated from source code when you do $ bin/omero web start.
If you apply the fixes from the above PR and Ola's one to the source code in lib/python/omeroweb/webgateway/static/webgateway/js then restart web,
you should see...

Code: Select all
$ bin/omero web start
Copying '/Users/wmoore/Desktop/OMERO/openmicroscopy/dist/lib/python/omeroweb/webclient/static/webclient/javascript/ome.tree.js'
Copying '/Users/wmoore/Desktop/OMERO/openmicroscopy/dist/lib/python/omeroweb/webgateway/static/webgateway/js/ome.viewportImage.js'
/Users/wmoore/Desktop/OMERO/openmicroscopy/dist/lib/python/pipeline/utils.py:11:

Post-processed 'omeroweb.viewer.min.css' as 'omeroweb.viewer.min.css'
Post-processed 'omeroweb.viewer.min.js' as 'omeroweb.viewer.min.js'

2 static files copied to '/Users/wmoore/Desktop/OMERO/openmicroscopy/dist/lib/python/omeroweb/static', 726 unmodified, 2 post-processed.


Hope that helps,
Cheers,

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Maximize Screen button - left panel options - web

Postby jwarren » Wed Jun 08, 2016 12:12 pm

Thanks Will. Thats great. I'll let you know how I get on.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: Maximize Screen button - left panel options - web

Postby atarkowska » Wed Jun 08, 2016 1:04 pm

Jonathan, it is worth to mention that we only recommend you to apply patch on you development server to not block your work. If you use production server I would recommend you to start separate OMERO.web instance using OMERO.python package (as is smaller) pointing to the same omero server to test the patch.

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Maximize Screen button - left panel options - web

Postby jwarren » Thu Jun 23, 2016 1:46 pm

Hi Will and Ola

I'm nearly there to being able to use this in production now. The fixes you have provided seem to work well.
I only have an issue now in that the minified js has the following error:
Code: Select all
omeroweb.viewer.min.js:25733 Uncaught TypeError: (intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(intermediate value)(...) is not a function


Reading stack overflow it suggests this is because of a missing ; at the end of a function somewhere in the code? I don't believe I've instroduced an error like this. Have you any tips on how I can get rid of this error? The omero js runs but any other js on our web page now fails to run because of this error.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: Maximize Screen button - left panel options - web

Postby atarkowska » Thu Jun 23, 2016 2:01 pm

Hi Jonathan,

Do you still have an original omeroweb.viewer.min.js ?
Could you compare the diff?

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Maximize Screen button - left panel options - web

Postby jwarren » Thu Jun 23, 2016 2:57 pm

Thanks Ola that is a good suggestion but I can't see anything wrong with the diffs here - maybe you can?
Code: Select all
20883,20886c20883,20885
<
<     wrapdiv.prepend('<span class="wb_zoomIn" style="top: 10px;"><img src="'+mediaroot+'/3rdparty/panojs-2.0.0/images/32px_plus.png" title="Zoom in" style="width: 20px;"></span>');
<     wrapdiv.prepend('<span class="wb_zoom11" style="top: 40px;"><img src="'+mediaroot+'/3rdparty/panojs-2.0.0/images/32px_11.png" title="Zoom 1:1" style="width: 20px;"></span>');
<     wrapdiv.prepend('<span class="wb_zoomOut" style="top: 70px;"><img src="'+mediaroot+'/3rdparty/panojs-2.0.0/images/32px_minus.png" title="Zoom out" style="width: 20px;"></span>');
---
>     var $wb_zoomIn = $('<span class="wb_zoomIn" style="top: 10px;"><img src="'+mediaroot+'/3rdparty/panojs-2.0.0/images/32px_plus.png" title="Zoom in" style="width: 20px;"></span>').prependTo(wrapdiv);
>     var $wb_zoom11 = $('<span class="wb_zoom11" style="top: 40px;"><img src="'+mediaroot+'/3rdparty/panojs-2.0.0/images/32px_11.png" title="Zoom 1:1" style="width: 20px;"></span>').prependTo(wrapdiv);
>     var $wb_zoomOut = $('<span class="wb_zoomOut" style="top: 70px;"><img src="'+mediaroot+'/3rdparty/panojs-2.0.0/images/32px_minus.png" title="Zoom out" style="width: 20px;"></span>').prependTo(wrapdiv);
21321c21320
<     $(".wb_zoomIn").click(function() {
---
>     $wb_zoomIn.click(function() {
21325c21324
<     $(".wb_zoomOut").click(function() {
---
>     $wb_zoomOut.click(function() {
21333c21332
<     $(".wb_zoom11").click(function() {
---
>     $wb_zoom11.click(function() {
21498,21499c21497,21502
<         jQuery(viewerBeanId).remove();
<         viewerBean = null;
---
>     if (viewerBean) {
>             viewerBean.clear()
>             viewerBean.viewer.remove()
>             viewerBean = null;
>         }
>
22117a22121
>  _this.viewportimg.get(0).destroyTiles();



You can see the error here: https://dev.mousephenotype.org/data/ima ... RY_034_001

Note removing the omeroweb.viewer.min.js and my js that depends on it removes any js errors.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: Maximize Screen button - left panel options - web

Postby atarkowska » Mon Jun 27, 2016 7:28 pm

Hi Jonathan,

Sorry for a slow response.

The following error is knows issue and is under investigation, but I am not sure how that can impact other scripts

Code: Select all
JQMIGRATE: Logging is active
TypeError: (intermediate value)(...) is not a function     omerowe....min.js (line 25335, col 22)
jQuery._farbtastic = function (container, callback) {


From your example I can see that you are loading jQuery UI 1.8.7 and jQuery 1.11.1. Did you try to remove them as they are already included in omero.viewer.min.js, however UI is newer jquery-ui-1.10.4.

here is a list all minified files in omero.viewer.min.js https://github.com/openmicroscopy/openm ... s.py#L1086

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Maximize Screen button - left panel options - web

Postby jwarren » Fri Jul 01, 2016 10:40 am

Thanks Ola. Your list of files included enabled me to sort this issue out by only including the small number of js files we need to make our limited functionality viewport work without having conflicting jqueries.

We are now much happier with our comparison viewer and can move it forward into production.

Thanks again.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: Maximize Screen button - left panel options - web

Postby atarkowska » Fri Jul 01, 2016 11:21 am

Great, could you show me the diff of the Pipeline dictionaries? Maybe we could help with future maintenance and make it configurable, otherwise you will have to maintain manually on each upgrade.

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Maximize Screen button - left panel options - web

Postby jwarren » Thu Jul 07, 2016 1:34 pm

Hi Ola

Sorry for not getting back to you sooner. I didn't configure the usage I just added the uncompressed js files we needed to the page:
<script src="${omeroStaticUrl}webgateway/js/ome.gs_slider.js" type="text/javascript"></script>
<script src="${omeroStaticUrl}webgateway/js/ome.popup.js" type="text/javascript"></script>
<script src="${omeroStaticUrl}webgateway/js/ome.gs_utils.js" type="text/javascript"></script>
<script src="${omeroStaticUrl}webgateway/js/ome.viewport.js" type="text/javascript"></script>
<script src="${omeroStaticUrl}webgateway/js/ome.viewportImage.js" type="text/javascript"></script>

I've also found another bug with the js viewport code. When using the mouse wheel to zoom in it works but then I would expect the mouse wheel in the opposite direction would zoom out - however as it is on our current version of omero nothing happens i.e. you can only zoom out with the "-" button.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

PreviousNext

Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron