From 8c21adcf08251b522efcc6f4a8302aab455db186 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Thu, 21 Oct 2010 23:25:27 -0400 Subject: [PATCH] clipping rectangles for interaction layer --- dygraph-canvas.js | 4 ++-- dygraph.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dygraph-canvas.js b/dygraph-canvas.js index c5c0ee0..0aa7ca1 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -309,12 +309,12 @@ DygraphCanvasRenderer = function(dygraph, element, layout, options) { // Set up a clipping area for the canvas (and the interaction canvas). // This ensures that we don't overdraw. - var ctx = this.element.getContext("2d"); + var ctx = this.dygraph_.canvas_.getContext("2d"); ctx.beginPath(); ctx.rect(this.area.x, this.area.y, this.area.w, this.area.h); ctx.clip(); - var ctx = this.dygraph_.hidden_.getContext("2d"); + ctx = this.dygraph_.hidden_.getContext("2d"); ctx.beginPath(); ctx.rect(this.area.x, this.area.y, this.area.w, this.area.h); ctx.clip(); diff --git a/dygraph.js b/dygraph.js index 8fbe9fa..6e9aac7 100644 --- a/dygraph.js +++ b/dygraph.js @@ -691,7 +691,7 @@ Dygraph.prototype.positionLabelsDiv_ = function() { var area = this.plotter_.area; var div = this.attr_("labelsDiv"); - div.style.left = area.x + area.w - this.attr_("labelsDivWidth") + "px"; + div.style.left = area.x + area.w - this.attr_("labelsDivWidth") - 1 + "px"; }; /** -- 2.7.4