Merge pull request #157 from CartoDB/fill-opacity
Allows for zero marker-fill-opacity
This commit is contained in:
commit
ce6351a2c4
@ -15,19 +15,20 @@
|
|||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(0, 0, pixel_size, 0, TAU, true, true);
|
ctx.arc(0, 0, pixel_size, 0, TAU, true, true);
|
||||||
ctx.closePath();
|
ctx.closePath();
|
||||||
|
|
||||||
|
if (st['marker-opacity'] !== undefined ) st['marker-fill-opacity'] = st['marker-line-opacity'] = st['marker-opacity'];
|
||||||
|
|
||||||
if (st['marker-fill']) {
|
if (st['marker-fill']) {
|
||||||
if (st['marker-fill-opacity'] !== undefined || st['marker-opacity'] !== undefined) {
|
ctx.globalAlpha = st['marker-fill-opacity'] >= 0? st['marker-fill-opacity']: 1;
|
||||||
ctx.globalAlpha = st['marker-fill-opacity'] || st['marker-opacity'];
|
|
||||||
|
if (ctx.globalAlpha > 0) {
|
||||||
|
ctx.fill();
|
||||||
}
|
}
|
||||||
ctx.fill();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// stroke
|
// stroke
|
||||||
ctx.globalAlpha = 1.0;
|
|
||||||
if (st['marker-line-color'] && st['marker-line-width'] && st['marker-line-width'] > LINEWIDTH_MIN_VALUE) {
|
if (st['marker-line-color'] && st['marker-line-width'] && st['marker-line-width'] > LINEWIDTH_MIN_VALUE) {
|
||||||
if (st['marker-line-opacity'] !== undefined) {
|
ctx.globalAlpha = st['marker-line-opacity'] >= 0? st['marker-line-opacity']: 1;
|
||||||
ctx.globalAlpha = st['marker-line-opacity'];
|
|
||||||
}
|
|
||||||
if (st['marker-line-width'] !== undefined) {
|
if (st['marker-line-width'] !== undefined) {
|
||||||
ctx.lineWidth = st['marker-line-width'];
|
ctx.lineWidth = st['marker-line-width'];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user