String y = Cache.getProperty(windowName + "SCREEN_Y");
String width = Cache.getProperty(windowName + "SCREEN_WIDTH");
String height = Cache.getProperty(windowName + "SCREEN_HEIGHT");
- if ((x != null) && (y != null) && (width != null) && (height != null))
+ if (Platform.isJS())
{
- int ix = Integer.parseInt(x), iy = Integer.parseInt(y),
- iw = Integer.parseInt(width), ih = Integer.parseInt(height);
- if (Cache.getProperty("SCREENGEOMETRY_WIDTH") != null)
+ String infoX = JalviewJSUtil.getJ2sInfoValue("x");
+ String infoY = JalviewJSUtil.getJ2sInfoValue("y");
+ String infoWidth = JalviewJSUtil.getJ2sInfoValue("width");
+ String infoHeight = JalviewJSUtil.getJ2sInfoValue("height");
+ if (infoX != null)
+ {
+ x = "100";
+ }
+ if (infoY != null)
+ {
+ y = "100";
+ }
+ if (infoWidth != null)
+ {
+ width = infoWidth;
+ }
+ if (infoHeight != null)
+ {
+ height = infoHeight;
+ }
+ jalview.bin.Console
+ .info("##### width=" + width + ", infoheight=" + infoHeight);
+ jalview.bin.Console.info("##### x=" + x + ", y=" + y);
+ }
+ // Not working for JalviewJS yet
+ if (!Platform.isJS() && (x != null) && (y != null) && (width != null)
+ && (height != null))
+ {
+ int ix = Integer.parseInt(x);
+ int iy = Integer.parseInt(y);
+ int iw = Integer.parseInt(width);
+ int ih = Integer.parseInt(height);
+ if (!Platform.isJS()
+ && Cache.getProperty("SCREENGEOMETRY_WIDTH") != null)
{
// attempt #1 - try to cope with change in screen geometry - this
// version doesn't preserve original jv aspect ratio.