Page 3 of 4

Re: Maximize Screen button - left panel options - web

PostPosted: Wed Jun 08, 2016 11:23 am
by wmoore
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.

Re: Maximize Screen button - left panel options - web

PostPosted: Wed Jun 08, 2016 12:12 pm
by jwarren
Thanks Will. Thats great. I'll let you know how I get on.

Re: Maximize Screen button - left panel options - web

PostPosted: Wed Jun 08, 2016 1:04 pm
by atarkowska
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

Re: Maximize Screen button - left panel options - web

PostPosted: Thu Jun 23, 2016 1:46 pm
by jwarren
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.

Re: Maximize Screen button - left panel options - web

PostPosted: Thu Jun 23, 2016 2:01 pm
by atarkowska
Hi Jonathan,

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

Ola

Re: Maximize Screen button - left panel options - web

PostPosted: Thu Jun 23, 2016 2:57 pm
by jwarren
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.

Re: Maximize Screen button - left panel options - web

PostPosted: Mon Jun 27, 2016 7:28 pm
by atarkowska
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

Re: Maximize Screen button - left panel options - web

PostPosted: Fri Jul 01, 2016 10:40 am
by jwarren
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.

Re: Maximize Screen button - left panel options - web

PostPosted: Fri Jul 01, 2016 11:21 am
by atarkowska
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

Re: Maximize Screen button - left panel options - web

PostPosted: Thu Jul 07, 2016 1:34 pm
by jwarren
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.