KRPANO IF/THEN statement question  

This sub-forum is for discussing and reporting bugs on any content that is not available by default in Panotour, so this concerns custom HTML templates, extra plugins (both Kolor-provided and third-party), etc...

Ce sous-forum a été créé pour discuter et/ou rapporter des bugs sur tout contenu qui n'est pas disponible par défaut dans Panotour, donc cela concerne les templates HTML customisés, plugins supplémentaires, etc...
no avatar
emblematicgroup
New member
 
Topic author
Posts: 8
Likes: 0 post
Liked in: 0 post
Joined: Mon Aug 08, 2016 11:40 pm
Info

KRPANO IF/THEN statement question

by emblematicgroup » Thu Nov 03, 2016 5:07 pm

Hi all,
So our project has grown a bit out of the Panotour realm and into strait up Krpano XML/Java editing. We are particularly trying to edit the functionality of the "KolorFloorPlan" plugin. All we are trying to do is change the png/icon for the active floorplan location to a different image file. For example, when we bring up the floorplan, we see a bunch of white locations and one red one. The red one is the active one. As we travel the floorplan, the white locations will turn red.

I was trying to do this in the index_Skin.xml by adding some kind of if statement to the FloorplanItem section, but it doesn't seem to be working.

here is what I"m trying to do... Take the variable of "selected_effect" and check if its set to pulsate. If so, swap the png file for the new png file. Is this WAY off? Can someone think of a better way to do this?

from index_skin.xml...
....
<option name="selected_effect" value="pulsate" type="string" />
</settings>

<floorplanItems selectedItem="" selectedSpot="" selectedSpotScene="" selectedSpotHeading="" selectedSpotFov="">


<floorplanItem
name="fpitempanogroup1353"
width="2126"
height="1535"
groupName="panogroup1353"
url="floorplan/floor01.png"
title="panogroup1353_floor_title"
heading="0">

<spot name="spotmap2808" posX="0.186441004" posY="0.282759011" heading="0" desc="spotmap2808_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano1345" jsClick="spotmap2808ActionSpotFloorPlan">

if (selected_effect == "Pulsate",
<icon url="spots/map_user_defaultmapSolid.png" iconWidth="30" iconHeight="30" iconAnchor="center" />,
<icon url="spots/map_user_defaultmap0.png" iconWidth="30" iconHeight="30" iconAnchor="center" />, )


</spot>

no avatar
emblematicgroup
New member
 
Topic author
Posts: 8
Likes: 0 post
Liked in: 0 post
Joined: Mon Aug 08, 2016 11:40 pm
Info

Re: KRPANO IF/THEN statement question

by emblematicgroup » Thu Nov 03, 2016 6:12 pm

Got it. The answer was in the CSS not the XML

@keyframes pulsate {
from {
transform: scale(1.0,1.0);
content:url("../../spots/map_user_defaultmapSolid.png");

}
to {
transform: scale(1.2,1.2);
content:url("../../spots/map_user_defaultmapSolid.png");
}

no avatar
emblematicgroup
New member
 
Topic author
Posts: 8
Likes: 0 post
Liked in: 0 post
Joined: Mon Aug 08, 2016 11:40 pm
Info

Re: KRPANO IF/THEN statement question

by emblematicgroup » Thu Nov 03, 2016 8:08 pm

Actually, that only seems to work with one browser, not on mobile.


Who is online

Users browsing this forum: No registered users and 1 guest

cron