Merge pull request #181 from CartoDB/sprite-limit
Limits sprite radius to a maximum of 255
This commit is contained in:
commit
4b10cc37d0
3
NEWS
3
NEWS
@ -1,3 +1,6 @@
|
||||
2.11.3
|
||||
- Limited sprite radius to a maximum of 255px
|
||||
- Fixed custom marker-file functionality in Firefox
|
||||
2.11.2
|
||||
- Added error handling to Torque
|
||||
- Fixed 'remove' event triggering when removing a Torque layer.
|
||||
|
@ -78,7 +78,8 @@
|
||||
if (st['marker-fill-opacity'] !== undefined || st['marker-opacity'] !== undefined) {
|
||||
ctx.globalAlpha = st['marker-fill-opacity'] || st['marker-opacity'];
|
||||
}
|
||||
ctx.drawImage(img, 0, 0, img.width, img.height);
|
||||
var maxSpriteRadius = 255;
|
||||
ctx.drawImage(img, 0, 0, Math.min(img.width, maxSpriteRadius), Math.min(img.height, maxSpriteRadius));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user