Comparing version 0.0.11 to 0.0.12
@@ -42,3 +42,4 @@ /** | ||
// Listeners | ||
this.listenTo(this.model, 'change:vp_height trigger_render', this.render); | ||
this.listenTo(this.model, 'trigger_render change:vp_height', this.render); | ||
this.listenTo(this.model, 'change:multi_y', this.toggleMultiY) | ||
this.listenTo(this.model.get('data'), 'add remove reset update', this.render); | ||
@@ -55,2 +56,5 @@ }, | ||
this.lockHeight(); | ||
// For other elements to do things before render process | ||
this.model.trigger('before_render'); | ||
@@ -76,8 +80,20 @@ | ||
var newHeight = Math.max(this.$el.height() , this.model.get('vp_height') ); | ||
this.unlockHeight(); | ||
// this.$el.css('height', 'auto'); | ||
// this.$el.css('height', newHeight); | ||
return this; | ||
}, | ||
toggleMultiY: function() { | ||
this.lockHeight(); | ||
var yaxes = this.subview('yaxes'); | ||
if (yaxes) yaxes.toggleMultiY(); | ||
}, | ||
lockHeight: function() { | ||
// Lock height to prevent scrollbar craziness | ||
this.$el.css({'height':this.$el.height()+'px'}); | ||
}, | ||
unlockHeight: function() { | ||
this.$el.css({'height':'auto'}); | ||
} | ||
@@ -84,0 +100,0 @@ |
@@ -21,3 +21,2 @@ var _ = require('underscore'); | ||
onMouseOver: function(evt){ | ||
this.chart.unscheduleFunction("point_mouseout"+this.cid); | ||
this.rEl.animate({"r":this.chart.get('dot_hover_radius')},300, "elastic"); | ||
@@ -53,6 +52,3 @@ this.chart.set('no_render', true); | ||
this.parent.$el.find('.chart-pointinfo').remove(); | ||
this.chart.scheduleFunction("point_mouseout"+this.cid,function(){ | ||
this.chart.set('no_render', false); | ||
}.bind(this), 1000); | ||
this.chart.set('no_render', false); | ||
} | ||
@@ -59,0 +55,0 @@ |
@@ -52,2 +52,4 @@ var Backbone = require('backbone'); | ||
setWidth: function(newWidth) { | ||
// ensure that rendering is on | ||
this.model.set('no_render', false); | ||
this.model.set({'vp_width':newWidth}, {validate: true}); | ||
@@ -58,2 +60,4 @@ this.model.state('vp_width', this.model.get('vp_width')); | ||
setHeight: function(newHeight) { | ||
// ensure that rendering is on | ||
this.model.set('no_render', false); | ||
this.model.set({'vp_height': newHeight}, {validate: true}); | ||
@@ -60,0 +64,0 @@ this.model.state('vp_height', this.model.get('vp_height')); |
@@ -16,3 +16,2 @@ /** | ||
this.setupSubviews(); | ||
this.listenTo(this.model, 'change:multi_y', this.toggleMultiY); | ||
}, | ||
@@ -19,0 +18,0 @@ |
{ | ||
"name": "charted", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Charts an entire collection of data. Single or multiple y-axes. Support for 64-bit integers. Auto-resizing axes.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
45571
1067