Added smoothening option

This commit is contained in:
Maxime Beauchemin 2016-01-27 09:45:02 -08:00
parent 40b28d0afa
commit 0714dc62d0
3 changed files with 11 additions and 0 deletions

View File

@ -116,6 +116,15 @@ class FormFactory(object):
'black_white']),
default='fire',
description=""),
'canvas_image_rendering': SelectField(
'Rendering', choices=(
('pixelated', 'pixelated (Sharp)'),
('auto', 'auto (Smooth)'),
),
default='pixelated',
description=(
"image-rendering CSS attribute of the canvas object that "
"defines how the browser scales up the image")),
'xscale_interval': SelectField(
'XScale Interval', choices=self.choicify(range(1, 50)),
default='1',

View File

@ -62,6 +62,7 @@ px.registerViz('heatmap', function(slice) {
.attr("height", heatmapDim[Y])
.style("width", hmWidth + "px")
.style("height", hmHeight + "px")
.style("image-rendering", fd.canvas_image_rendering)
.style("left", margins.l + "px")
.style("top", margins.t + "px")
.style("position", "absolute");

View File

@ -1212,6 +1212,7 @@ class HeatmapViz(BaseViz):
'fields': (
'linear_color_scheme',
('xscale_interval', 'yscale_interval'),
'canvas_image_rendering',
)
},)
def query_obj(self):