if marker-line-width is 0 no border should be renderered fixed #16
This commit is contained in:
parent
fe8f58fd38
commit
fd03f92b83
@ -6,27 +6,36 @@
|
||||
function renderPoint(ctx, st) {
|
||||
ctx.fillStyle = st.fillStyle;
|
||||
ctx.strokStyle = st.strokStyle;
|
||||
var pixel_size = st['point-radius']
|
||||
var pixel_size = st['point-radius'];
|
||||
|
||||
// render a circle
|
||||
|
||||
// fill
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, pixel_size, 0, TAU, true, true);
|
||||
ctx.closePath();
|
||||
if(st.fillStyle) {
|
||||
if(st.fillOpacity) {
|
||||
if (st.fillStyle) {
|
||||
if (st.fillOpacity) {
|
||||
ctx.globalAlpha = st.fillOpacity;
|
||||
}
|
||||
ctx.fill();
|
||||
}
|
||||
|
||||
// stroke
|
||||
ctx.globalAlpha = 1.0;
|
||||
if(st.strokeStyle) {
|
||||
if(st.strokeOpacity) {
|
||||
if (st.strokeStyle && st.lineWidth) {
|
||||
if (st.strokeOpacity) {
|
||||
ctx.globalAlpha = st.strokeOpacity;
|
||||
}
|
||||
if(st.lineWidth) {
|
||||
if (st.lineWidth) {
|
||||
ctx.lineWidth = st.lineWidth;
|
||||
}
|
||||
ctx.strokeStyle = st.strokeStyle;
|
||||
ctx.stroke();
|
||||
|
||||
// do not render for alpha = 0
|
||||
if (ctx.globalAlpha > 0) {
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +47,7 @@
|
||||
ctx.drawImage(img, 0, 0, w, h);
|
||||
}
|
||||
|
||||
exports.torque.cartocss = exports.torque.cartocss|| {};
|
||||
exports.torque.cartocss = exports.torque.cartocss || {};
|
||||
exports.torque.cartocss = {
|
||||
renderPoint: renderPoint,
|
||||
renderSprite: renderSprite
|
||||
|
Loading…
Reference in New Issue
Block a user