You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

1

Monday, December 16th 2013, 11:14pm

Scrollarea

Have custom map with scrollarea and zoomin/out functionality.
When zoomed in and than scrolled to corner and than zoomed out -> map is zoomed out but not positioned in corner anymore (bug in all three corners scrollarea is not aligned on)
Noticed that small manual screen size reduction is triggering some viewer internal action and scrollarea is scrolled automatically to correct position. Is there a command to force this.
Can read roverflow, toverflow, boverflow, woverflow, hoverflow to detect is this command is to be called. Tried with invalidatescreen(), updatescreen() with no luck.


Anyone had similar behavior and found a way to force alignment to corner always?

Alexey Tkachenko

Professional

Posts: 749

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Tuesday, December 17th 2013, 11:48am

Interesting to see it in action. Can you post a link?
Regards,

Alexey

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

3

Tuesday, December 17th 2013, 11:52am

Not at the moment. No online version available. Will prepare demo at the evening and post the link here.

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

4

Tuesday, December 17th 2013, 7:44pm

Hereis the online version to get impression on what I'm talking about

Use case is following:
- when image is loaded go to + sigh and press twice
- Map is zoomed. Scroll image with mouse (dragging) to some corner. Image will align automatically at the end in the corner.
- Press - sigh for zoom out. Image will reduce and stay not aligned correctly.

At this point need some tweaks to align it. Interesing is when at this moment you go maximise or change window size it align perfectly. That lead me in direction of invalidate/update screen commands. Tried with no luck.

Do you have any idea. Have seen that behaviour on other forum collegues too. Thought this is some code mistake or Scrollarea plugin inperfection but now when I see that is image goes where it should be when window size adjusted....hm

Alexey Tkachenko

Professional

Posts: 749

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

5

Tuesday, December 17th 2013, 10:45pm

Really hard nut to crack...

Fortunately I have a zoomable map in one of my VTs, so I gave it a look.

I added trace(); to onscroll(); and checked x and y of scrollarea. So log gave me a flow of numbers when scrollarea was scrolling. Obviously there's some algorythm we cannot solve without Klaus(( As I understand it, scrollarea tends to settle on some "x/y" point which depends on its "align" value and its ratio to the stage width and height. For sure, when scrolled, scrollarea alters its x/y coordinates, as I see it in the log. So when I click "zoom_out" button while scrollarea is still scrolling, it works fine and scrollarea sticks to the corner. However, if I let it come to a halt and then press "zoom_out", then it stays still and doesn't stick to the corner.

I thought about adding "layer[scrollarea].scrolltocenter(0,0);" to the "zoom_out" button's onclick, but it won't do because it would scroll away to the align edge and that would be strange for those who view the map.

Let's wait for what Klaus would say...
Regards,

Alexey

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

6

Wednesday, December 18th 2013, 1:09am

Found a way but this is really dirty temporary solution. Spent hours on tweaking it.
Link
[EDIT: this solve just one issue there. ]
Reading loverflow, roverflow, toverflow, boverflow, woverflow, hoverflow have made algorithm to monitor those values and as result to tell me when scroll is in some corner. Than switched alignment and x and y values of it.
Also this automatic alignment was not perfect so had to make trustful deviation for correct determination of the corners.

Maybe this solution will give Klaus idea on how to improve scrollarea one day *whistling*

This post has been edited 1 times, last edit by "Umalo" (Dec 22nd 2013, 2:03am)


Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

7

Sunday, December 22nd 2013, 11:27pm

If you run to this issue and scrollarea is not updated, let me save you hours I spent to realize that only thing needed is to redraw area with e.g.

Source code

1
copy(area.width,area.width);

*blink*

8

Saturday, August 30th 2014, 11:55am

Hi Umalo,


is this bug fixed now?


I am very very need this pluginā€˜s feature.


could you show me the last version if you fixed it....


thank you very much.


*smile*

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

9

Saturday, August 30th 2014, 12:13pm

Should be in latest v 17.5 but have to confirm it yet. Will come back here. Have to do tests.
Umalo

10

Saturday, August 30th 2014, 12:26pm

Waiting for good news *g*

11

Sunday, August 27th 2017, 4:10pm

Hi Umalo, Alexey,

Since I can't see Umalo's example, please let me know If your post is related to the request for help in my post.
I assume the scrollarea plugin is still on the level of the krpano ver. 1.17.5.

In any case, do you have some word of wisdom, what I need to consider, when trying to keep the focus in the zooming layer?

Thank you,
Pavel

Similar threads