Skip to content

Commit

Permalink
Added smoothening option
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jan 27, 2016
1 parent 40b28d0 commit 0714dc6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions panoramix/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ def __init__(self, viz):
'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',
Expand Down
1 change: 1 addition & 0 deletions panoramix/static/widgets/viz_heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions panoramix/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ class HeatmapViz(BaseViz):
'fields': (
'linear_color_scheme',
('xscale_interval', 'yscale_interval'),
'canvas_image_rendering',
)
},)
def query_obj(self):
Expand Down

0 comments on commit 0714dc6

Please sign in to comment.