Page 1 of 1

logic block show / hide elements for mobile

Posted: Thu Oct 26, 2017 12:30 pm
by stalwart
Hi all,

I’ve completed a complex tour of 3 x separate apartments – using tags to show / hide each apartment.

www.360imagery.co.uk/draft/bow_square_complete

Each tour includes a floor plan which I only want to show for tablet / desktop – so I’m using a logic block to hide the floor plan elements when the player width is less than 320 pixels wide for mobile. This theory works fine with a single apartment, but I’m using a splash start screen to choose apartments to view, and the trigger ‘mouse click’ is to hide the splash screen, and display the ‘view floor plan’ button. But what I need is a logic block to this action – i.e. only show the ‘view floor plan’ button if player width is more than 320 pixels wide (or keep hidden if less than 320px). Make sense?

At the moment the logic block works fine on desktop shrinking / expanding browser manually, but on mobile the action of mouse click a ‘view apartment’ button on the start splash screen loads the corresponding ‘view floor plan’ button automatically.

Any ideas?
Stu

Re: logic block show / hide elements for mobile

Posted: Thu Oct 26, 2017 1:01 pm
by Hopki
Hi Stu,
Why not add the visible logic block width to each of the floor plans and the floor plan button?
Also I would swop the "change apartment" and "view floor plan" buttons so when you show and hide the view floorpan button you don't end up with a gap.
So when less than width I would also consider the width as some phones are wider than 320px.
Looking good though :-)
Cheers,
Hopki

Re: logic block show / hide elements for mobile

Posted: Thu Oct 26, 2017 1:14 pm
by stalwart
Hi Martin,

Back from holiday(s) so soon....?!!!
Hopki wrote: Thu Oct 26, 2017 1:01 pm Why not add the visible logic block width to each of the floor plans and the floor plan button?
I have done - each floor plan launch button has a logic block action player Width > 400 visible: true, default: false.....It works resizing the browser, but I want this logic to apply to the apartment choice button call to action.
Hopki wrote: Thu Oct 26, 2017 1:01 pm Also I would swop the "change apartment" and "view floor plan" buttons so when you show and hide the view floorpan button you don't end up with a gap.
I need the gap as I use a "mini" player for mobile devices
Hopki wrote: Thu Oct 26, 2017 1:01 pm So when less than width I would also consider the width as some phones are wider than 320px.
What would you recommend? iOS I set @ 320 px - what about smartphone / Android "average"...?

Stu

Re: logic block show / hide elements for mobile

Posted: Thu Oct 26, 2017 1:30 pm
by Hopki
Hummmm,
No idea what you mean, perhaps a call on the Bat phone!
Cheers,
Hopki

Re: logic block show / hide elements for mobile

Posted: Thu Oct 26, 2017 1:53 pm
by stalwart
Hopki wrote: Thu Oct 26, 2017 1:30 pm Hummmm,
No idea what you mean, perhaps a call on the Bat phone!
HA! will do this PM. Have sent skin file via "bat-mail".....!

Re: logic block show / hide elements for mobile

Posted: Thu Oct 26, 2017 2:24 pm
by Hopki
For anyone following this thread.
As Stu was using the visible actions to show and hide the floor plans the fix was to use the Alpha logic block.
So when the player width was below a size all elements would hide with changing the alpha to 0.
This way not effecting the show and hide operations of the buttons.
Cheers,
Hopki

Re: logic block show / hide elements for mobile

Posted: Thu Oct 26, 2017 6:51 pm
by stalwart
Thanks to Martin - all now fixed and working correctly:

www.360imagery.co.uk/draft/bow_square_complete/

3 x apartment virtual tours linked together as a "master" tour, but separated using tags.....

I love Pano2VR!

Stu