Skip to content

Commit d015a43

Browse files
committed
mapbox: move svg paths for logo into constants
1 parent a54b8a3 commit d015a43

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/plots/mapbox/constants.js

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plots/mapbox/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,25 +129,25 @@ exports.toSVG = function(gd) {
129129
var logo = fullLayout._glimages.append('g');
130130
logo.attr('transform', 'translate(' + (size.l + size.w * domain.x[0] + 10) + ', ' + (size.t + size.h * (1 - domain.y[0]) - 31) + ')');
131131
logo.append('path')
132-
.attr('d', 'm 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z')
132+
.attr('d', constants.mapboxLogo.path0)
133133
.style({
134134
opacity: 0.9,
135135
fill: '#ffffff',
136136
'enable-background': 'new'
137137
});
138138

139139
logo.append('path')
140-
.attr('d', 'M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z')
140+
.attr('d', constants.mapboxLogo.path1)
141141
.style('opacity', 0.35)
142142
.style('enable-background', 'new');
143143

144144
logo.append('path')
145-
.attr('d', 'M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z')
145+
.attr('d', constants.mapboxLogo.path2)
146146
.style('opacity', 0.35)
147147
.style('enable-background', 'new');
148148

149149
logo.append('polygon')
150-
.attr('points', '11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34')
150+
.attr('points', constants.mapboxLogo.polygon)
151151
.style({
152152
opacity: 0.9,
153153
fill: '#ffffff',

0 commit comments

Comments
 (0)