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.

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

1

Friday, November 16th 2012, 12:07pm

Plugin GetAbsXY (krpano extends)

Hi!
I wish to share plugin for free
it's plugin for geting absolute x and y of any plugin.
For example, you have many plugin that included eachother and has various of align and edge and x/y.
But you want to know plugin absolute x in stage coordinates.
Then this plugin (getabsxy) will help you.

Initiate (it will add new getabsxy object into krpano):

Source code

1
<plugin name="anyname" preload="true" url="getabsxy.swf" alturl="getabsxy.js" />


And usage:

Source code

1
2
getabsxy.getx(absx, name);trace(absx);
getabsxy.getx(absy, name);trace(absy);

Where:
absx/absy - any variable for coordinate value store
name - is the target plugin/layer name

Enjoy
Andrey *thumbup*
Sudarchikov Andrey has attached the following file:
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

This post has been edited 1 times, last edit by "Sudarchikov Andrey" (Nov 16th 2012, 5:10pm)


  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

2

Friday, August 9th 2013, 2:31pm

Hello!Is there someone who used this plugin?
Any feedback?

Thanks in advance
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

pezim

Beginner

Posts: 6

Location: Neuenhof, Schweiz

  • Send private message

3

Saturday, August 17th 2013, 3:36pm

Hi Andrey,
Yes, I use this plugin, it's very helpful. But it working only correct when unscaled plugins or layers ar used. Any suggestions about this problem?
Regards
Peter

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

4

Sunday, August 18th 2013, 10:45am

Hi!
thanks for feedback! :)

Yes you are right, there is no scaled plugins calculations.
I'll think about that *rolleyes*


Regards

Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

5

Monday, March 17th 2014, 9:51pm

Hi Andrew,

yes, PERFECT.... *thumbsup* *thumbsup* *thumbsup*
THANK YOU...

I´m developing a webpage based on the Player, inside a scrollable textarea I have an InputTextField, which must be moved to the correct position on mobiles caused by the keyboard...
And you`re PlugIn was solving my problem... *thumbup*

Good work, an absolute MUST HAVE PlugIn for coders... *love*
THANKS ONE MORE TIME...
Steve

6

Tuesday, March 18th 2014, 12:47pm

Hi Andrew,

okay, working with you`re plugin and found out some interesting things:
Works fine if the plugin is in one or two parent elements, but I have one plugin which has 3 parent Elements (the last/third parent Element is a scrollArea...) and then I got an error message:

ERROR: getabsxy plugin v1.0: gety - plugin pugin[txtContainer_scrollarea] not found
The only value I got then is the y-Value of the plugin, based on the scrollarea...

But I need the absolute XY Coordinates....????

Could it be solved, if you give a "path" trough the parent Elements to get my absXY?

Any help is welcome... *smile*
Steve

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

7

Tuesday, March 18th 2014, 3:58pm

Hi!
it's doesn't metter how many parents
But I didn't test it with scrollarea
Scrollarea is a special plugin, perhaps it is a reason.

Andrey

PS - not sure I can solve it.
But I can recomend you try my draggablelayer plugin for scrolling or simple dragging layers
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

8

Tuesday, March 18th 2014, 11:05pm

Andrew thanks for having a look at it!

Yes, I´m using the krpano scrollarea plugin which is really very smooth even on touchdevices...

Righht now I´m measuring from the last "reachable" layer (the layer which is NOT in the scrollarea) to my target layer to get the absX/Y Coordinates, some more maths, but then I got my Value...

Would be fine if you could manage that problem, you have written a very useful PlugIn, should be a part of Klaus Player... ;-)

best regards,
Steve

Anoril

Trainee

Posts: 69

Location: Paris, France

Occupation: Game Developer and Photographer

  • Send private message

9

Wednesday, August 27th 2014, 7:28pm

Hello!

I just tested it with KRPano 1.17-2 (I did not try with previous version though) and when I ask a "PanoTour Thumbnail Item" for its position, I got "NaN".

A thumb item is plugin in a plugin in a plugin. Sometimes (on hover), the item is scaled.

Does this is the known "scaled" or "2 or more parents" issue?

Regards,

Paul
« Quidquid latine dictum sit, altum sonatur »
Pentax stuff.

10

Wednesday, August 27th 2014, 8:18pm

Hi Paul,

Just so you know, I also needed what you ask, so I made a plugin similar to this one that works with any number of parents or scaling. It's published in the Krpano plugins section here.


Best regards,
Hernán
My Krpano plugins: Auto Thumbs - Tooltip - Abs

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

11

Wednesday, August 27th 2014, 10:09pm

Hi!
your plugin looks nice, hope it fast and optimized.
Nice work

Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

12

Thursday, August 28th 2014, 4:09am

Thanks! Based on my tests it is.

Thanks to you for the inspiration.

Hernán
My Krpano plugins: Auto Thumbs - Tooltip - Abs

Anoril

Trainee

Posts: 69

Location: Paris, France

Occupation: Game Developer and Photographer

  • Send private message

13

Thursday, August 28th 2014, 7:04pm

Hi! :)

Thanks Hernan for the plugin, but I'm broke and I resolved for a free plugin :) The point with free plugins is that it happens they do not work as expected ;)
One good thing with your's Hernan, is that it deals with hotspot, too :)

Actually, Andrey's one is working fine for a bunch of items in my pano but not for the ones I need it :)

Here is the code for the items: (if Andrey has time to check and update his work...)

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!-- Here is Containing Hierachy:
   	- thumbArray	(accessible with GetAbsXY)
         	+- thumbBgLayout (accessible too)
                  	+- items... (not accessible)
-->
<plugin name="thumbArray" keep="true" zorder="1" url="Viergedata/graphics/transparent.png" handcursor="false" capture="false" children="true" alpha="0.9" smoothing="true" x="0" y="0" scale="1" align="left" edge="right" width="10%" height="prop"/>
	<plugin name="thumbBgLayout" keep="true" zorder="1" url="Viergedata/graphics/transparent.png" handcursor="false" capture="false" x="0" y="0" align="center" edge="center" width="100%" height="prop" parent="thumbArray"/>
	<plugin name="slide" parent="thumbArray" keep="true" zorder="0" url="Viergedata/graphics/slide.png" handcursor="false" capture="false" children="true" alpha="0.9" smoothing="true" x="0" y="0" align="right" edge="right" width="100%" height="2000" onclick="slide_action_in"/>
	<plugin name="strap" keep="true" zorder="0" url="Viergedata/graphics/strap.png" parent="thumbArray" alpha="0.9" align="right" edge="left" handcursor="true" onclick="slide_action_in"/>
	<plugin name="strapArrow" keep="true" parent="strap" zorder="0" url="Viergedata/graphics/arrow.png" align="center" edge="center" capture="false" enabled="false" rotate="0"/>
	
<!-- thumbs pictures -->
<!-- Those items are unreachable for GetAbsXY plugin, which returns 'NaN' -->
	<plugin name="thumb_Vierge0" keep="true" zorder="2" parent="thumbBgLayout" url="Viergedata/graphics/Vierge0_thumbnail.jpg" width="83.3333%" height="prop" align="topleft" edge="center" x="50%" y="10.7143%" alpha="0.8" onclick="mainloadpano(Vierge0.xml);" onover="magnify('thumb_Vierge0'); " onout="lie('thumb_Vierge0');" visible="false" onloaded="thumbloaded();"/>

<!-- Related actions -->
<action name="thumbloaded">
		inc(plugin[thumbnailsData].nbThumbnailsLoaded, 1);
		if(plugin[thumbnailsData].nbThumbnailsLoaded GE 5,
		set(plugin[thumb_Vierge0].visible, true);
		adjusthtml5thumbsplugins();
		);
</action>
<action name="adjusthtml5thumbsplugins">
		if (ishtml5 == true,
		set(plugin[thumbMovePrev].height, 5%);
		set(plugin[thumbMoveNext].height, 5%);
		);
	</action>
<action name="magnify">
		tween(plugin[%1].alpha,  1.0, 0.3, easeInQuad);
		tween(plugin[%1].scale, 1.05, 0.3, easeInQuad);
	</action>
	<action name="lie">
		tween(plugin[%1].alpha, 0.8, 0.3, easeInQuad);
		tween(plugin[%1].scale, 1.0, 0.3, easeInQuad);
	</action>


Regards,
« Quidquid latine dictum sit, altum sonatur »
Pentax stuff.

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

14

Friday, August 29th 2014, 8:04am

Hi!
Can you provide your example?
I'll take a look and try to find out what is wrong

Regards
Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Anoril

Trainee

Posts: 69

Location: Paris, France

Occupation: Game Developer and Photographer

  • Send private message

15

Monday, October 6th 2014, 11:36am

Hi!

Thanks to Andrei, the problem is solved: size and positioning should be in digits, not in percent!

Regards,
« Quidquid latine dictum sit, altum sonatur »
Pentax stuff.

Similar threads