Thread: Bug - imagecontrol - zoom factor
-
September 11th, 2021, 02:54 #1
- Join Date
- May 2016
- Posts
- 521
Bug - imagecontrol - zoom factor
I don't know if this is new or not but here is the issue.
I'm trying to use setViewpoint/setViewpointCenter and it seems that the imagecontrol always ignores the zoom factor.
You can most easily see this happen by launching with any ruleset with any image.
1. Open the image. Close FGU. Look at the windowstate.xml file. You will see the image control settings that it should use when you open the window again.
2. Now launch and view the image again but this time zoom in. Close FGU and you will note that the windowstate.xml updates as expected with a greater zoom.
3. Launch again and open the image and you will see it isn't zoomed.
I've tried with my own code and it gives the same results and it always ignores the zoom factor for the setViewpoint/sVC commands.
Jason
-
September 11th, 2021, 03:16 #2
Moved to the Unity support forum. The Laboratory forum is for reporting issues in the latest public test version.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
September 11th, 2021, 03:49 #3
- Join Date
- May 2016
- Posts
- 521
A little more details of my testing.
I can make it work if the window has already been established for a time. (I added a button that did only the setViewpoint)
However the following won't work. Maybe my fault cause I'm missing something?
local rWindow = Interface.openWindow("imagewindow","imagename");
local rNewImgCtrl = rWindow.image;
rNewImgCtrl.setViewpoint(1000,800,0.5);
Do I need to move my setViewpoint to code that is in the onFirstLayout() for the imagecontrol?
Either way the method I described in the first post should presumably work since it is saved for it to work on reload.
Jason
-
September 11th, 2021, 05:31 #4
- Join Date
- May 2016
- Posts
- 521
I think this is just a timing issue. When I ask it to zoom it isn't done creating the window. You can close this if you wish.
-
September 11th, 2021, 23:21 #5
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
Thanks for letting us know.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks