Posts by mstoss

    With the next krpano 1.21 version, which is mainly an update for viewer-side, I'm preparing parallel also a lot for krpano 2.0, which will be mainly a tools-side update.

    I'd very much appreciate a tools focused update. There's some tools out there, but krpano is still offering the best quality and flexibility - if you know how to code. Making that part easier would be a big deal.

    Looks like an issue caused by the security settings in that company. Even basic links without the plugin to those same PDFs which are supposed to open in a new browser tab are opening with the open/save PDF dialogue instead.

    Hello,
    Once in a while I need to show some detail shots in a panorama. Normally I just open the desired image "as is". This seems to work on all devices apart from smartphones, where I need to add e.g. a scale.mobile="0.5" parameter.

    However, now I need to open a detail shot with further infos. I tried to achieve this by a parent/child layout, where the basic image is the parent element and an additional - clickable - element is located on that image via x/y values. In its basic form, this could be e.g. a "close x" or the red/blue example below. This is still working fine - apart from smartphones: here the additional elements don't stick to the places I expect them to be.

    So, I seem to be missing the basic point of locating elements in their relation to each other in a way which is device independent.


    If I should go for width/height parameters in %, how do I relate the child elements to a specific location? In my understanding, I can only do this in absolute values via x/y in pixels and the child parameters should than resize according to the dimensions of the parent element.I'm probably on the wrong track and here is some of my code so far (just to give you an impression). Can somebody point me to the right one, please?

    Yours
    Michael


    Edit: Lord... I just forgot to add the scalechildren parameter...

    Hi,


    I just saw a client open a PDF via the plugIn: It did open via the usual OPEN/DOWNLOAD option window for PDF documents instead of inside the panoramas plugin area. That's not a problem in itself - I suspect some company security settings being responsible for that. But when you open the PDF that way, the panorama is showing the empty background only, with its circling waiting sign, as if it is still trying to open the PDF "inbox". First clicking on the background is closing the plugin as usual and showing the panorama again.

    Any solution?

    Yours,
    Michael

    Hi,
    I thought it would be of interest to some, that I used a different aproach for some html-links, which I had to include as well.

    The language folders work nice, but I needed to point the user to some links to web pages in english and german as well. So I used a data: set for the links and included them as follows:

    (v_lang is being set to "en" or "de" via the switch, e.g. via a dropdown menu)

    The action:

    Code
    <action name="a_openlocalizedurl">
    					openurl('get(data[url_infopoint-%1-%2].content)',_blank);
    	</action>

    The dynamic link:

    Code
    <layer name="box5startlink" type="image" style="linkspotstyle" url="skin/linkspot.png" visible="true" parent="box5start" x="10" y="20" onclick="a_openlocalizedurl(box5startlink,get(v_lang));"	/>	
    
    
    <layer name="box5pluslink" type="image" style="linkspotstyle" 
    url="skin/linkspot.png" visible="true" parent="box5start" x="10" y="70" 
    onclick="a_openlocalizedurl(box5pluslink,get(v_lang));"	/>	
    
    
    (...)

    The data:

    Hi,
    beside switching between different language content via different folders (https://krpano.com/forum/wbb/inde…&threadID=17499) I need to open different URLs depending on the choosen language.

    My idea is, to simply use a data: set to store the links. Is it possible to do this?

    e.g.:


    I know the last part is not right, but I have missed the right way to transform the data.content into a variable or use it directly to open the url. I tried several things, but I'm a bit worried, that I'm on the wrong track completely.

    Code
    <action name="a_openlocalizedurl">
    					trace(data[url_infopoint-%1-%2].content);
    <!--					set(urlloc,data[url_infopoint-%1-%2].content);-->
    					copy(urlloc, get(data[url_infopoint-%1-%2].content));
    	</action>


    I very much would appreciate some hint, why this is not working.

    Yours,

    Michael

    Sorry guys, for bothering you with the ever basic problems. My scripting knowledge has not really improved over the years.

    So, here's my problem.

    I have got a language switch (via the xml combo box) to set a variable to "en" or "de" for english/german language.
    I did place jpgs in their respective languages into two folders "en" and "de".

    The idea is, to show the right image to the user depending on the chosen language. Sounds simple. Maybe it is, maybe it isn't, as some would say - I'm no expert.


    The first layer has a hard coded url to show you, what I want to achieve. I tried with the very basic image name and add the path according to this post , but that did not work, I went crazy in my IFs like this:

    Code
    if	(v_lang == 'en', 
    					trace('Sprache ist englisch'),	
    					if	(		layer.tag == 'img', <!-- I tried to attach tags to my layers as in the example, took them away again -->
    								for	(set(i,0), i LT layer.count, inc(i),						
    									calc(v_path, 'stills/en/' + layer[get(i)].url);				
    									set(layer[get(i)].url, get(v_path));
    									trace(layer[get(i)].url);						
    									);	
    ...


    I tried to use the calc action directly then, but that did not work either - probably because I don't know how to use it correctly. Something in the line with url="calc:'%CURRENTXML%/stills/' + get(v_lang) + '/box5-hs.jpg'"

    Is there any smart way to achieve this? It's only one tiny part of the url that has to be changed according to a simple variable. That has to be easy... somehow... or not?

    I really, really... really appreciate some help with this.

    Michael

    Just updated a recent project via krpano Tools - the log key option, using the "O" key, does not seem to work any longer? Is there an alternative to that to check for errors?

    Yours,
    Michael

    o-kay...

    I deleted the url parameter from the original hotspot to check this out. Where it is still working with one condition and tracing a proper url, it only traces me a "hotspot[].url with the other. So I now copied the hotspot itself to be available in a "devices="desktop" and "devices="mobile" version: and voila, the switch conditions are working for both lines now!
    Thank you so much, Klaus!
    Yours,
    Michael

    Hi,

    I'm going nuts with an if condition at the moment.
    Whatever I do, only the first part of the if condition is accepted and changing the hotspot(flipspot01).url to different values. The else part is leaving the hotspot[flip01].url unchanged to its original value. Why is this?

    Code
    if(device.mobile, 
    									trace(is mobile);	
    									switch(hotspot[flip01].url,stills/flip-big_01.jpg,stills/flip-big_02.jpg,stills/flip-big_03.jpg);
    						,
    									trace(is other);	
    									switch(hotspot[flip01].url,stills/flip-small_01.jpg,stills/flip-small_02.jpg,stills/flip-small_03.jpg);
    						);
    						trace(hotspot[flip01].url);


    All help greatly appreciated, as always...
    Michael