diff --git a/frontend/javascripts/frontend.js b/frontend/javascripts/frontend.js index b16c720..aa7d8ee 100644 --- a/frontend/javascripts/frontend.js +++ b/frontend/javascripts/frontend.js @@ -49,8 +49,8 @@ vz.wui.init = function() { $('#controls').buttonset(); // tuple resolution - var tup = $('#tuples'); - tup.val(vz.options.tuples).change(function() { + vz.options.tuples = Math.round($('#flot').width() / 3); + $('#tuples').val(vz.options.tuples).change(function() { vz.options.tuples = $(this).val(); vz.entities.loadData(); }); @@ -429,7 +429,7 @@ vz.load = function(context, identifier, data, success) { data: data, error: function(xhr) { json = JSON.parse(xhr.responseText); - vz.errorDialog(xhr.statusText, json.exception.message, xhr.status); // TODO error vs. exception + vz.wui.dialogs.error(xhr.statusText, json.exception.message, xhr.status); // TODO error vs. exception } }); }; diff --git a/frontend/javascripts/init.js b/frontend/javascripts/init.js index acab5f9..ee26c38 100644 --- a/frontend/javascripts/init.js +++ b/frontend/javascripts/init.js @@ -63,7 +63,11 @@ $(document).ready(function() { vz.options.save(); }); - $(window).resize(vz.drawPlot); + $(window).resize(function() { + vz.options.tuples = Math.round($('#flot').width() / 3); + $('#tuples').val(vz.options.tuples); + vz.drawPlot(); + }); // parse uuids & options from cookie vz.uuids.load();