Skip to content

Commit c5ad356

Browse files
authored
Merge pull request #8022 from plotly/update-json-button-icon
2 parents 3efeee4 + 17fdcd5 commit c5ad356

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

draftlogs/7990_add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- Add an opt-in modebar button for downloading Plotly figures as JSON [[#7990](https://github.com/plotly/plotly.js/pull/7990)], with thanks to @gokul-debugger for the contribution!
1+
- Add an opt-in modebar button for downloading Plotly figures as JSON [[#7990](https://github.com/plotly/plotly.js/pull/7990), [#8022](https://github.com/plotly/plotly.js/pull/8022)], with thanks to @gokul-debugger for the contribution!

src/components/modebar/buttons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ modeBarButtons.downloadJson = {
7474
title: function (gd) {
7575
return _(gd, 'Download plot as JSON');
7676
},
77-
icon: Icons.disk,
77+
icon: Icons.curlybraces,
7878
click: function (gd) {
7979
Registry.call('downloadImage', gd, {format: 'full-json'})
8080
.then(function(filename) {

src/fonts/ploticon.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ module.exports = {
1919
path: 'm518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z',
2020
transform: 'matrix(1 0 0 -1 0 850)'
2121
},
22+
curlybraces: {
23+
width: 18,
24+
height: 16,
25+
path: 'M 9,4 C 7.354992,4 6,5.354992 6,7 V 9 C 6,9.2999997 5.8778068,9.8883542 5.5878906,10.291016 5.2979744,10.693677 4.9222213,11 4,11 a 1.0001,1.0001 0 0 0 0,2 c 0.2999997,0 0.8883542,0.122193 1.2910156,0.412109 C 5.693677,13.702026 6,14.077779 6,15 v 2 c 0,1.645008 1.354992,3 3,3 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 H 9 C 8.4358712,18 8,17.564129 8,17 V 15 C 8,13.625876 7.3766799,12.602305 6.6113281,11.96875 6.8086352,11.794047 7.0679793,11.657537 7.2109375,11.458984 7.8210204,10.611647 8,9.6999993 8,9 V 7 C 8,6.4358712 8.4358712,6 9,6 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m 5.5,0 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 0.564129,0 1,0.4358712 1,1 v 2 c 0,0.6999993 0.17898,1.611647 0.789062,2.458984 0.142959,0.198553 0.402303,0.335063 0.59961,0.509766 C 16.62332,12.602305 16,13.625876 16,15 v 2 c 0,0.564129 -0.435871,1 -1,1 h -0.5 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 1.645008,0 3,-1.354992 3,-3 v -2 c 0,-0.922221 0.306323,-1.297974 0.708984,-1.587891 C 19.111646,13.122193 19.7,13 20,13 a 1.0001,1.0001 0 0 0 0,-2 C 19.077779,11 18.702026,10.693677 18.412109,10.291016 18.122193,9.8883542 18,9.2999997 18,9 V 7 C 18,5.354992 16.645008,4 15,4 Z',
26+
transform: 'translate(-3 -4)'
27+
},
2228
zoombox: {
2329
width: 1000,
2430
height: 1000,

0 commit comments

Comments
 (0)