/plugins/link_button
The module exports the link_button plugin method to mapp.plugins{}
- Source
Methods
(inner) addButton(link)
The addButton method creates a link element and appends the element to the mapButton.
Parameters:
PropertiesName | Type | Description |
---|---|---|
link | Object | The link object. |
Name | Type | Description |
---|---|---|
link.href | string | The link URL. |
link.title | string | The link title, defaults to "Link". |
link.target | string | The link target, defaults to "_blank". |
link.css_class | string | The class for the div, defaults to "mask-icon". |
link.css_style | string | The style for the div. |
- Source
(inner) link_button(link_button)
The link_button locale property is provided as the link_button function argument. This can be either a single object or an array of objects.
"link_button": [
{
"href": "/url/url",
"title": "TITLE HERE",
"css_style": "mask-image: url(https://geolytix.github.io/MapIcons/services/component_exchange.svg); -webkit-mask-image: url(https://geolytix.github.io/MapIcons/services/component_exchange.svg);"
},
{
"href": "/foo",
"title": "Foo"
}
]
The link_button method will call the addButton method for each link_button object.
Parameters:
Name | Type | Description |
---|---|---|
link_button | Object | The link_button config, can be an array of objects. |
- Source