Picture of Arend Raifsnider
Hot Graphics Using Graphics as Pins
by Arend Raifsnider - Friday, 15 April 2016, 7:15 PM
 

I'm just looking for a little guidance on the _useGraphicsAsPins setting on the Hot Graphic component. I've got four graphics (all the same just for my test) but it seems to be displaying them wrong. The images are lower and cropped in the frame that they're supposed to be (see screenshot). I've used the hot graphic component with the pins without any trouble but I seem to be missing something here.

Can someone point out what I'm doing wrong?

Here's my code:

{
"_id": "c-31",
"_parentId":"b-46",
"_classes": "",
"_type":"component",
"_component": "hotgraphic",
"_layout": "full",
"title": "Hot graphic",
"displayTitle": "Hot graphic",
"body": "This is optional body text. Select the hotspots on the image to reveal the text. This component will scale down to a narrative when viewed on mobile.",
"mobileBody": "This is optional body text that will be shown when viewed on mobile.",
"instruction":"",
"mobileInstruction": "This is optional instruction text that will be shown when viewed on mobile.",
"_setCompletionOn":"allItems",
"_useGraphicsAsPins": true,
"_canCycleThroughPagination": false,
"_hidePagination": false,
"_graphic": {
"src": "",
"alt": "alt text"
},
"_items": [
{
"title": "Have prospects been identified?",
"body": "<strong>Metrics</strong><br><br><ul><li>Stakeholder SWOT analysis completed</li><li>Leads and/or Contacts recorded in CRM</li></ul>",
"_graphic": {
"src": "course/en/images/item1.jpg",
"alt": "alt text",
"_classes": "cols-2 rows-1"
},
"pinAlt": "alt text",
"strapline": "strapline...",
"_classes": "",
"_top": 0,
"_left": 0
},
{
"title": "Hotspot 2 title",
"body": "This is display text 2.",
"_graphic": {
"src": "course/en/images/item1.jpg",
"alt": "alt text",
"_classes": "cols-2 rows-1"
},
"pinAlt": "alt text",
"strapline": "strapline...",
"_classes": "",
"_top": 0,
"_left": 50
},
{
"title": "Hotspot 3 title",
"body": "This is display text 3.",
"_graphic": {
"src": "course/en/images/item1.jpg",
"alt": "alt text",
"_classes": "cols-2 rows-1"
},
"pinAlt": "alt text",
"strapline": "strapline...",
"_classes": "",
"_top": 50,
"_left": 0
},
{
"title": "Hotspot 4 title",
"body": "This is display text 4.",
"_graphic": {
"src": "course/en/images/item1.jpg",
"alt": "alt text",
"_classes": "cols-2 rows-1"
},
"pinAlt": "alt text",
"strapline": "strapline...",
"_classes": "",
"_top": 50,
"_left": 50
}
]
},

Picture of Simon Ray
Re: Hot Graphics Using Graphics as Pins
by Simon Ray - Monday, 18 April 2016, 6:06 AM
 

Hi Arend

I had a similar issue, but the images wouldn't show at all.  I found that resizing them down to about 600px x 600px did the trick.

This might not help, but it's worth looking at.

Simon

Picture of Arend Raifsnider
Re: Hot Graphics Using Graphics as Pins
by Arend Raifsnider - Tuesday, 19 April 2016, 6:56 PM
 

Hi Simon,

Thanks for the suggestion but the graphics still look offset. Even more so now! Not sure what mistake I'm making.

Arend

 

Picture of Simon Ray
Re: Hot Graphics Using Graphics as Pins
by Simon Ray - Wednesday, 20 April 2016, 10:09 PM
 

Hi Arend

I copied your code from above into one of my projects and put an image in called item1.jpg and then had a look, and it worked perfectly, so I don't think it's the code.  Maybe try different images? Beyond that, take it out and put it back in again from the example.json file or even uninstall the component and reinstall it?

Simon