From d07be630c20bac7455d1ee1d338eb46a5f34408e Mon Sep 17 00:00:00 2001 From: Alex de Mulder Date: Fri, 9 Jan 2015 12:36:03 +0100 Subject: [PATCH] tweaked circles --- dist/vis.js | 9 ++++----- lib/network/Node.js | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dist/vis.js b/dist/vis.js index 12422eb6..f8b4d425 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -26956,15 +26956,14 @@ return /******/ (function(modules) { // webpackBootstrap this._drawRawCircle(ctx, centerX, centerY, radius); ctx.save(); - ctx.beginPath(); - ctx.arc(centerX, centerY, radius, 0, Math.PI * 2, true); - ctx.closePath(); - ctx.clip(); + ctx.circle(this.x, this.y, radius); + ctx.stroke(); + ctx.clip(); this._drawImageAtPosition(ctx); ctx.restore(); - + this.boundingBox.top = this.y - this.options.radius; this.boundingBox.left = this.x - this.options.radius; this.boundingBox.right = this.x + this.options.radius; diff --git a/lib/network/Node.js b/lib/network/Node.js index 074ee3e7..8ef9ef7a 100644 --- a/lib/network/Node.js +++ b/lib/network/Node.js @@ -630,15 +630,14 @@ Node.prototype._drawCircularImage = function (ctx) { this._drawRawCircle(ctx, centerX, centerY, radius); ctx.save(); - ctx.beginPath(); - ctx.arc(centerX, centerY, radius, 0, Math.PI * 2, true); - ctx.closePath(); - ctx.clip(); + ctx.circle(this.x, this.y, radius); + ctx.stroke(); + ctx.clip(); this._drawImageAtPosition(ctx); ctx.restore(); - + this.boundingBox.top = this.y - this.options.radius; this.boundingBox.left = this.x - this.options.radius; this.boundingBox.right = this.x + this.options.radius;