File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 8
8
:getScale =" getScale"
9
9
:getStack =" getStack"
10
10
:clickHandler =" clickHandler"
11
+ :showDownloadButton =" showDownloadButton"
12
+ :downloadName =" downloadName"
11
13
/>
12
14
<ContinuousLegend v-if =" legendType === 'continuous'"
13
15
:variable =" variable"
14
16
:lWidth =" lWidth"
15
17
:lItemHeight =" lItemHeight"
16
18
:getScale =" getScale"
17
19
:getStack =" getStack"
20
+ :showDownloadButton =" showDownloadButton"
21
+ :downloadName =" downloadName"
18
22
/>
19
23
</div >
20
24
</template >
@@ -69,6 +73,14 @@ export default {
69
73
},
70
74
' clickHandler' : {
71
75
type: Function
76
+ },
77
+ ' showDownloadButton' : {
78
+ type: Boolean ,
79
+ default: false
80
+ },
81
+ ' downloadName' : {
82
+ type: String ,
83
+ default: ' legend'
72
84
}
73
85
},
74
86
data () {
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import Expected from './expected';
50
50
51
51
// Other
52
52
import { EVENT_TYPES , EVENT_SUBTYPES , EVENT_SUBTYPE_RESETS } from './history/base-events' ;
53
+ import { downloadSvg } from './helpers' ;
53
54
54
55
// Reference: https://stackoverflow.com/questions/28282295/getbbox-of-svg-when-hidden
55
56
const _getBBox = SVGGraphicsElement . prototype . getBBox ;
@@ -120,4 +121,5 @@ export {
120
121
// Other
121
122
computedParam ,
122
123
EVENT_TYPES , EVENT_SUBTYPES , EVENT_SUBTYPE_RESETS ,
124
+ downloadSvg ,
123
125
}
You can’t perform that action at this time.
0 commit comments