Skip to content

Commit

Permalink
Minor cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jan 10, 2016
1 parent fc038a6 commit a4c7964
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
6 changes: 6 additions & 0 deletions panoramix/static/panoramix.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ var px = (function() {
container: container,
container_id: container_id,
selector: selector,
width: function(){
return token.width();
},
height: function(){
return token.height();
},
render: function() {
token.find("img.loading").show();
container.hide();
Expand Down
4 changes: 2 additions & 2 deletions panoramix/static/widgets/viz_bignumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ px.registerViz('big_number', function(slice) {

var f = d3.format('.3s');
var fp = d3.format('+.1%');
var width = slice.container.width();
var height = slice.container.height() - 30;
var width = slice.width();
var height = slice.height() - 30;
var svg = div.append('svg');
svg.attr("width", width);
svg.attr("height", height);
Expand Down
4 changes: 2 additions & 2 deletions panoramix/static/widgets/viz_directed_force.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Modified from http://bl.ocks.org/d3noob/5141278
*/

function viz_directed_force(slice) {
var width = slice.container.width();
var height = slice.container.height() - 25;
var link_length = slice.data.form_data['link_length'];
var div = d3.select(slice.selector);
if (link_length === undefined){
Expand All @@ -15,6 +13,8 @@ function viz_directed_force(slice) {
charge = -500;
}
var render = function() {
var width = slice.width();
var height = slice.height() - 25;
d3.json(slice.jsonEndpoint(), function(error, json) {

if (error != null){
Expand Down
4 changes: 2 additions & 2 deletions panoramix/static/widgets/viz_sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ function viz_sankey(slice) {
var div = d3.select(slice.selector);

var render = function() {
var width = slice.container.width();
var height = slice.container.height() - 25;
var width = slice.width();
var height = slice.height() - 25;
var margin = {top: 5, right: 5, bottom: 5, left: 5};
width = width - margin.left - margin.right;
height = height - margin.top - margin.bottom;
Expand Down
4 changes: 2 additions & 2 deletions panoramix/static/widgets/viz_sunburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Modified from http://bl.ocks.org/kerryrodden/7090426

function viz_sunburst(slice) {
var container = d3.select(slice.selector);
var width = slice.container.width();
var height = slice.container.height() - 25;
var width = slice.width();
var height = slice.height() - 25;
var render = function() {
// Breadcrumb dimensions: width, height, spacing, width of tip/tail.
var b = {
Expand Down
2 changes: 1 addition & 1 deletion panoramix/static/widgets/viz_wordcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ px.registerViz('word_cloud', function(slice) {
else {
var f_rotation = function() { return (~~(Math.random() * 6) - 3) * 30; };
}
var size = [slice.container.width(), slice.container.height() - 25];
var size = [slice.width(), slice.height()];

scale = d3.scale.linear()
.range(range)
Expand Down
4 changes: 1 addition & 3 deletions panoramix/templates/panoramix/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
{% endmacro %}

<div class="container-fluid datasource">
<div class="datasource">
<form id="query" method="GET" style="display: none;">
<div class="header">
<a class="btn btn-primary druidify" data-toggle="tooltip" title="Slice!">
Expand Down Expand Up @@ -52,7 +52,6 @@
</div>
<hr/>
</div>
<div class="row">
<div id="form_container" class="col-left-fixed">
{% for fieldset in form.fieldsets %}
<fieldset class="fs-style">
Expand Down Expand Up @@ -153,7 +152,6 @@
<div id="{{ viz.token }}_con" class="slice_container" style="height: 100%; width: 100%"></div>
</div>
</div>
</div>
<div class="modal fade" id="query_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
Expand Down

0 comments on commit a4c7964

Please sign in to comment.