2 Replies Latest reply on Jun 26, 2015 4:13 PM by Silver Back Gorilla

    Dialog Window Location in CC 2015?

    Silver Back Gorilla Level 1

      In Photoshop CC2015, the dialog windows always center themselves regardless of the coordinates given to the window.  I've tried both window.frameLocation and window.location.  This works fine prior to CC2015.  I have this command right before window.show().  I also tried adding window.frameLocation to onShow but it still puts it in the center.  I then tried adding a button to the UI with the window.framelocation and it will move the window to where it is suppose to be.

       

      Is there any way to automate a piece of code to run right after the window is drawn?  If so, the window could be moved to the proper location after it is drawn.

       

      I think that window.show() is calculating the center and overwriting the location.  I tested by alerting the location just before it is drawn and then adding a button to alert after the window pops up.  The location just before .show() is the correct location that I give it.  After the window appears, the window.frameLocation values that I get from the test button change to the center.  The only code ran between the 2 alerts is window.show() so it must be recalculating the window coordinates.

       

      This works prior to CC2015........

       

      winX=100;

      winY=100;

      window.frameLocation=[winX,winY];

      window.show();

       

      I also tried this variation but the onShow code runs just before the window is drawn.

       

      winX=100;

      winY=100;

      window.onShow=function{window.frameLocation=[winX,winY];}

      window.show();