Skip to content

Commit

Permalink
Set the default antialiasing to 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Jan 16, 2017
1 parent 87801cd commit e2f7ed8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/lines/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ block append mainContent
input#miterLimit(placeholder="10")
.form-group(title="Antialiasing (a non-negative number). Edges of lines will be antialiased by this many pixels. Values larger than 2 tend to make things blurry.")
label(for="antialiasing") antialiasing
input#antialiasing(placeholder="1")
input#antialiasing(placeholder="2")
.form-group(title="Show road names and categories on hover.")
label(for="hovertext") Info on Hover
input#hovertext(type="checkbox", placeholder="false")
Expand All @@ -38,8 +38,8 @@ block append mainContent
input#showmap(type="checkbox", placeholder="true", checked="checked")
.form-group
.shortlabel Presets
button.preset(strokeColor='{"residential":"blue","service":"green","other":"black"}', strokeWidth='{"residential":4,"service":1,"other":8}', lineCap='round', antialiasing=2, showmap='true', title='Properties based on road category') Categories
button.preset(strokeColor='', strokeWidth='{"residential":1,"service":0.25,"other":3}', lineCap='round', lineJoin='', miterLimit='', antialiasing=2, showmap='false', title='Thin lines based on road category') Thin
button.preset(strokeColor='{"residential":"blue","service":"green","other":"black"}', strokeWidth='{"residential":4,"service":1,"other":8}', lineCap='round', showmap='true', title='Properties based on road category') Categories
button.preset(strokeColor='', strokeWidth='{"residential":1,"service":0.25,"other":3}', lineCap='round', lineJoin='', miterLimit='', showmap='false', title='Thin lines based on road category') Thin
button.preset(strokeColor='line:red,orange,yellow,green,blue,indigo,violet', strokeWidth='line:1,2,4,8,16', lineCap='line:butt,round,square', lineJoin='line:miter,bevel,round,miter-clip', miterLimit=4, title='Properties varied by line') Lines
button.preset(strokeColor='red,orange,yellow,green,blue,indigo,violet', strokeWidth='1,2,4,8,16', lineCap='butt,round,square', lineJoin='miter,bevel,round,miter-clip', miterLimit=4, title='Properties varied by line segment') Segments

1 change: 1 addition & 0 deletions examples/lines/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ $(function () {
};
// Defaults for the line controls
var defaultStyles = {
antialiasing: 2,
lineCap: 'butt',
lineJoin: 'miter',
miterLimit: 10,
Expand Down
2 changes: 2 additions & 0 deletions src/lineFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ var lineFeature = function (arg) {
strokeColor: { r: 1.0, g: 0.8431372549, b: 0.0 },
strokeStyle: 'solid',
strokeOpacity: 1.0,
// Values of 2 and above appear smoothest.
antialiasing: 2.0,
closed: false,
line: function (d) { return d; },
position: function (d) { return d; }
Expand Down
2 changes: 1 addition & 1 deletion testing/test-data/base-images.tgz.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
914356846f8c541a813bb7e53efc6c57
734c48b65fb16a5dd0636547da736e42
2 changes: 1 addition & 1 deletion testing/test-data/base-images.tgz.url
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://data.kitware.com/api/v1/file/586d1ff18d777f05f44a5c75/download
https://data.kitware.com/api/v1/file/587ce8628d777f05f44b1441/download

0 comments on commit e2f7ed8

Please sign in to comment.