Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

Commit ea90cea

Browse files
committed
add parameters to manage hotspot shape and text color
1 parent d2d04a0 commit ea90cea

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Some limitation exists with FOP (tested with FOP 2.4): internal link between ima
1414
- DITA-OT 3.1 and older: run `dita --install https://github.com/Amplexor/com.amplexor.imagemap-pdf/releases/download/v1.0/com.amplexor.imagemap-pdf-v1.1.zip`
1515

1616
## Parameters
17-
* **imagemap.hotspot.enabled** set to "yes" to enable imagemap hotspot insertion in the generated PDF.
17+
- **imagemap.hotspot.enabled**: set to "yes" to enable imagemap hotspot insertion in the generated PDF.
18+
- **imagemap.hotspot.shape.color**: defines hotspot shape color. The default value is 'blue'.
19+
- **imagemap.hotspot.text.color**: defines hotspot text color. The default value is 'white'.
1820

1921

2022
## Usage with Antenna House

imagemap/ut-domain-attr.xsl

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
44
xmlns:xs="http://www.w3.org/2001/XMLSchema"
55
version="2.0">
6-
7-
<xsl:variable name="defaultSvgShapeStrokeColor" select="'blue'" as="xs:string"/>
8-
<xsl:variable name="defaultSvgHotspotTextColor" select="'white'" as="xs:string"/>
6+
7+
<xsl:param name="imagemap.hotspot.shape.color" select="'blue'" as="xs:string"/>
8+
<xsl:param name="imagemap.hotspot.text.color" select="'white'" as="xs:string"/>
99

1010
<xsl:attribute-set name="svg_shape_container">
1111
<xsl:attribute name="absolute-position">absolute</xsl:attribute>
@@ -16,7 +16,7 @@
1616
</xsl:attribute-set>
1717

1818
<xsl:attribute-set name="svg_shape">
19-
<xsl:attribute name="stroke"><xsl:value-of select="$defaultSvgShapeStrokeColor"/></xsl:attribute>
19+
<xsl:attribute name="stroke"><xsl:value-of select="$imagemap.hotspot.shape.color"/></xsl:attribute>
2020
<xsl:attribute name="stroke-width">1</xsl:attribute>
2121
<xsl:attribute name="fill-opacity">0</xsl:attribute>
2222
<xsl:attribute name="stroke-opacity">1</xsl:attribute>
@@ -29,15 +29,15 @@
2929
<xsl:attribute-set name="svg_shape_circle" use-attribute-sets="svg_shape"/>
3030

3131
<xsl:attribute-set name="svg_hotspot_circle">
32-
<xsl:attribute name="stroke"><xsl:value-of select="$defaultSvgShapeStrokeColor"/></xsl:attribute>
33-
<xsl:attribute name="fill"><xsl:value-of select="$defaultSvgShapeStrokeColor"/></xsl:attribute>
32+
<xsl:attribute name="stroke"><xsl:value-of select="$imagemap.hotspot.shape.color"/></xsl:attribute>
33+
<xsl:attribute name="fill"><xsl:value-of select="$imagemap.hotspot.shape.color"/></xsl:attribute>
3434
<xsl:attribute name="stroke-width">1</xsl:attribute>
3535
<xsl:attribute name="fill-opacity">1</xsl:attribute>
3636
<xsl:attribute name="stroke-opacity">1</xsl:attribute>
3737
</xsl:attribute-set>
3838

3939
<xsl:attribute-set name="svg_hotspot_circle_content">
40-
<xsl:attribute name="fill"><xsl:value-of select="$defaultSvgHotspotTextColor"/></xsl:attribute>
40+
<xsl:attribute name="fill"><xsl:value-of select="$imagemap.hotspot.text.color"/></xsl:attribute>
4141
<xsl:attribute name="font-size">0.4em</xsl:attribute>
4242
<xsl:attribute name="font-weight">bold</xsl:attribute>
4343
<xsl:attribute name="font-family">sans-serif</xsl:attribute>

params.xml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<extension>
33
<param name="imagemap.hotspot.enabled" expression="${imagemap.hotspot.enabled}" if:set="imagemap.hotspot.enabled" xmlns:if="ant:if"/>
4+
<param name="imagemap.hotspot.shape.color" expression="${imagemap.hotspot.shape.color}" if:set="imagemap.hotspot.shape.color" xmlns:if="ant:if"/>
5+
<param name="imagemap.hotspot.text.color" expression="${imagemap.hotspot.text.color}" if:set="imagemap.hotspot.text.color" xmlns:if="ant:if"/>
46
</extension>
57

plugin.xml

+2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
<val desc="No" default="true">no</val>
1414
<val desc="Yes">yes</val>
1515
</param>
16+
<param name="imagemap.hotspot.shape.color" desc="Hotspot shape color for imagemap. The default value is 'blue'." type="string"/>
17+
<param name="imagemap.hotspot.text.color" desc="Hotspot text color for imagemap. The default value is 'white'." type="string"/>
1618
</transtype>
1719
</plugin>

0 commit comments

Comments
 (0)