self.hairlineWasDragged(h, event, ui);
}
// TODO(danvk): set cursor here
- })
- .on('click', function() {
- self.moveHairlineToTop(h);
});
h = $.extend({
}, props);
var that = this;
- $infoDiv.on('click', '.hairline-kill-button', function() {
+ $infoDiv.on('click', '.hairline-kill-button', function(e) {
that.removeHairline(h);
$(that).triggerHandler('hairlineDeleted', {
xval: h.xval
});
$(that).triggerHandler('hairlinesChanged', {});
+ e.stopPropagation(); // don't want .click() to trigger, below.
+ }).on('click', function() {
+ that.moveHairlineToTop(h);
});
return h;
that.updateHairlineDivPositions();
that.updateHairlineInfo();
- this.updateHairlineStyles();
+ that.updateHairlineStyles();
that.attachHairlinesToChart_();
$(that).triggerHandler('hairlineCreated', {
});
// Select/Deselect hairlines on click.
- $('.hairline-info').click(function() {
+ $(document).on('click', '.hairline-info', function() {
+ console.log('click');
var xval = $(this).data('xval');
var hs = hairlines.get();
for (var i = 0; i < hs.length; i++) {