Sie sind nicht angemeldet.

1

Montag, 16. Dezember 2013, 23:14

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?

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Dienstag, 17. Dezember 2013, 11:48

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

Alexey

3

Dienstag, 17. Dezember 2013, 11:52

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

4

Dienstag, 17. Dezember 2013, 19:44

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

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

5

Dienstag, 17. Dezember 2013, 22:45

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

6

Mittwoch, 18. Dezember 2013, 01:09

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*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Umalo« (22. Dezember 2013, 02:03)


7

Sonntag, 22. Dezember 2013, 23:27

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.

Quellcode

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

*blink*

8

Samstag, 30. August 2014, 11:55

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*

9

Samstag, 30. August 2014, 12:13

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

10

Samstag, 30. August 2014, 12:26

Waiting for good news *g*

11

Sonntag, 27. August 2017, 16:10

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

Ähnliche Themen