Welcome to TalkGraphics.com
Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 48
  1. #31
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: Grouping/multiple selecting popups

    @Acorn - It can be more readily implemented (without Layers) if you just add the same Class Name as the Pin so you have Pin/Shop Front. The Shop front needs a back-link to the map to complete the journey.
    I set up a simple example of this with arrows and labels but you elevated it to its proper position.
    @Acorn - agreed including the shop window details with the location class (pin) works much better than popups; changed shops 34 & 35 as examples: https://initiostar.co.uk/demo/zMap/.

    To make it visibly easy to edit the layout, I placed the two shop details on their own "class" layers which avoids stacking on the MouseOff layer. As long as there is no link to a "class" layer and it is visible, it seems to work OK.

    The upside is that "Close Pins" clears the Shop Window too - the sticky red mannequin brings the map back into view.

    I did look at condensing the full shop-index into an accordion style dropdown category menu, but the full index scrolls well and not sure it is worth faffing around with additional code.

    Tested all this on an Xperia X Compact 4.6" screen - the shop index font size could maybe go to 23px.

    @LGF - I have attached an updated XAR. - I think now you should be able to avoid all popups.

    Gary

    BTW: should have said the links to pins needs javascript: hidePins();showPin('LOC34')
    Last edited by Initiostar; 14 December 2020 at 06:21 PM. Reason: The important bit!!

  2. #32
    Join Date
    Oct 2010
    Location
    South Africa
    Posts
    877

    Default Re: Grouping/multiple selecting popups

    Quote Originally Posted by Acorn View Post
    Gary, a solid effort; the Shop Front is wizard as a concept.

    It can be more readily implemented (without Layers) if you just add the same ClassName as the Pin so you have Pin/Shop Front. The Shop front needs a back-link to the map to complete the journey.
    I set up a simple example of this with arrows and labels but you elevated it to its proper position.

    I do like the red mannequin. It needs to be pointing.
    I would personally go that little further and add an Anchor to every shop listing so on clicking the Pin the page srolls to the listing and the mannequin is there pointing.

    Overall, I think this is a well-rounded approach that needs to be established as a Xara 'Map / You are Here' Template.

    Acorn
    @Gary - I blown away by your efforts to help solve this problem - thank you SO much! AND IT IS USABLE ON MOBILE!

    Regarding the "internal reference for each pop up" - I'm a bit confused by "Ref> cpu(7)" - this is a link to Shop Popup1. Why does there have to be a link?
    Sorry if this shows lack of understanding on my part, but why do I have to keep track of the layers - couldn't pin1 read 44 instead and the popup layer be renamed popup44?
    All the shops are listed below the map so it's easy for me to see "who's who".


    @Acorn - Thank you for all your thinking too! - like the idea of being able to go back the List of Places Menu...but I'll get this "simple version" working first.

  3. #33
    Join Date
    Oct 2010
    Location
    South Africa
    Posts
    877

    Default Re: Grouping/multiple selecting popups

    Errrr - I really liked the popups - combines 2 things into 1 - but now I'm back to dealing with 45 layers again....mmmm....
    ...maybe I can try and combine my existing popup layers but with the new approach....

    why does the internal popup reference no.1 for instance, show Ref>cpu(7) and not (1) to correspond to popup layer1? Its "label" is used to trigger shop popup 1 at the same time (in addition to) the pin.....?

  4. #34
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: Grouping/multiple selecting popups

    Quote Originally Posted by letsgofishing View Post
    Errrr - I really liked the popups - combines 2 things into 1 - but now I'm back to dealing with 45 layers again....mmmm....
    ...maybe I can try and combine my existing popup layers but with the new approach....

    why does the internal popup reference no.1 for instance, show Ref>cpu(7) and not (1) to correspond to popup layer1? Its "label" is used to trigger shop popup 1 at the same time (in addition to) the pin.....?
    @LGF OK let's try to explain some things here:

    1. The standard way to link to a popup is to link to the name you have given it in the P&L gallery. However, when you want to execute more than one action simultaneously, you would revert to using a JavaScript link. This requires you to identify Xara's internal reference for that popup (or if related to popup actions only see here: https://help.xara.com/article/26-und...d-web-features).

    2. To find these, you would click on a standard popup – in my example REF> is the link to each popup. When you hover over that link (in a Chrome browser), in the bottom left of your screen you will see javascript: xr_cpu(n), where 'n' is the internal reference for that popup. It will be different for every popup across all variants and you must preview the complete site (note just the page) in order to get the correct reference. See: https://initiostar.co.uk/demo/HowTo/ - this was extended to help with the explanation (not for live use). I use the reference table to keep track of Xara's internal popup references.

    3. The ONLY reason I created a shop popup is to create a Shop Window – without it just give each pin a class name 'hmtlclass=LOCx' and use the link javascript: showPin('LOCx'). Each pin then has a header anchor to its category.

    4. Should you want to have the SHOP WINDOW, this can be a popup, OR a set of objects that are given the SAME class name as their associated pin. For the shop window popups, to show the pin AND open the shop window, this is two simultaneous actions and you need to use a javascript link to achieve that: showPin('LOCx'); xr_cpu(n).

    5. Should you want to use a Class approach, you can as highlighted from the Clothing Jewellery link, simply create each shop window by giving any objects you want to appear in that space the same Class name as the pin to which they refer. As doing so would have all objects stacked on top of one another in the same space, I have used a visible layer for each class Shop Window - all objects on that layer have the same class name as the pin to which they refer. These layers must be visible when you publish.

    6. All I did to switch from using a popup for Shops 34 & 35 was to create two layers, in this case with layer names of Class 35 and Class 34, The names could be anything, but it was easier to highlight I was using a class method for these two shops and to give them their shop number. Then, I copied and pasted the content from the popup to the Class layer and gave everything the class name associated with its pin.


    Personally, I would switch to using Classes and not Popups (as per shops 34 & 35). You could try just removing any links to a previous popup, give all the objects the same class name as their pin and make it visible. Not tested it, but if it works would save you some time.

    Gary
    Attached Files Attached Files

  5. #35
    Join Date
    Oct 2010
    Location
    South Africa
    Posts
    877

    Default Re: Grouping/multiple selecting popups

    Hi Gary - you really do go the extra mile...
    I do understand the "mechanics" of the what bits of JS do, I was just wondering if what they are called(named) could be changed, but I see it's the "structure?" f the code.

    I'm going to give the Classes a go for one category of shops and see how it comes out.
    Many thanks,
    Mike

    EDIT:Sorry
    I just wondering why the first Ref on the Popup Internal Reference is cpu7 - why not 1? What are Ref>cpu(1-6) being used for?

    I will go the layers route but it would help a lot if the layer number eg: Beyond Boutique which is TH8, I want to call Class 8 - not class 35. And the name for the corresponding red dot to be htmlclass=LOC8

    Many thanks,
    Mike
    Last edited by letsgofishing; 16 December 2020 at 07:29 AM. Reason: THINKING:

  6. #36
    Join Date
    Oct 2010
    Location
    South Africa
    Posts
    877

    Default Re: Grouping/multiple selecting popups

    I've just worked out that I can label them corresponding shop numbers as long as I change all the names and LOC pins as well...

  7. #37
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: Grouping/multiple selecting popups

    That's true, you can use any names you want, but you cannot have duplicates. You can only have 1 x TH8. so you might need something like TH8A if there is more than one shop with the same label.

  8. #38
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,916

    Default Re: Grouping/multiple selecting popups

    I've been experimenting for a few days now on creating a location spot that didn't require a clear button. The canvas option looked promising however mobile browsers couldn't accomodate ctx.clearRectange so whilst it worked fine on a pc and cleared the spots it didn't on mobile browsers.

    I'v gone a different route now, here's the result. Only the Accomodation section works at present. I'm having issue with local and global variable at present for links to the websites but I'll push on. It's a fun challenge.

    NOTE: I've made no effort to locate the location spots in the real locations as I don't know where they are. However it's very simple to do so.

    DEMO
    Last edited by Egg Bramhill; 17 December 2020 at 06:53 PM.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  9. #39
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,916

    Default Re: Grouping/multiple selecting popups

    Here's a link to the canvas method but it doesn't work on mobile browsers, all the location dots remain visible. Just click on any of the three orange buttons at the top. EDIT: Works okay in FF but not in Chrome of Edge!

    DEMO


    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  10. #40
    Join Date
    Oct 2010
    Location
    South Africa
    Posts
    877

    Default Re: Grouping/multiple selecting popups

    Quote Originally Posted by Initiostar View Post
    That's true, you can use any names you want, but you cannot have duplicates. You can only have 1 x TH8. so you might need something like TH8A if there is more than one shop with the same label.
    Yip - exactly what I did!

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •