Skip to content

Commit

Permalink
Merge pull request #862 from girder/heatmap-scale-zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
naglepuff authored May 23, 2022
2 parents 5cd8b33 + 12ffeb0 commit f40ed1d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion girder_annotation/docs/annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,11 @@ near by values aggregate together when viewed.
# the rangeValues. Optional
"rangeValues: [0, 1], # A list of range values corresponding to the colorRange list
# and possibly normalized to a scale of [0, 1]. Optional
"normalizeRange": true # If true, the rangeValues are normalized to [0, 1]. If
"normalizeRange": true, # If true, the rangeValues are normalized to [0, 1]. If
# false, the rangeValues are in the
# value domain. Defaults to true. Optional
"scaleWithZoom": true # If true, scale the size of points with the zoom level of
# the map. Defaults to false. Optional
}

Grid Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,12 @@ class AnnotationSchema:
'data. If false (the default), the rangeValues '
'are the actual data values.',
},
'scaleWithZoom': {
'type': 'boolean',
'description':
'If true, scale the size of points with the '
'zoom level of the map.'
}
},
'required': ['type', 'points'],
'additionalProperties': False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ function convertHeatmap(record, properties, layer) {
radius: record.radius || 25,
blurRadius: 0,
gaussian: true,
color: colorTable.color
color: colorTable.color,
scaleWithZoom: record.scaleWithZoom || false
},
position: (d) => ({x: d[0], y: d[1], z: d[2]}),
intensity: (d) => d[3] || 0,
Expand Down

0 comments on commit f40ed1d

Please sign in to comment.