Skip to content

Commit

Permalink
Show circular arcs when xStart and xEnd are defined in tile data
Browse files Browse the repository at this point in the history
  • Loading branch information
pkerpedjiev committed Nov 14, 2020
1 parent 2ab8144 commit 70e7db5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Arcs1DTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const Arcs1DTrack = (HGC, ...args) => {
}

drawCircle(graphics, item, opacityScale, storePolyStr) {
const x1 = this._xScale(item.chrOffset + item.fields[1]);
const x2 = this._xScale(item.chrOffset + item.fields[2]);
const x1 = this._xScale(item.xStart || item.chrOffset + item.fields[1]);
const x2 = this._xScale(item.xEnd || item.chrOffset + item.fields[2]);

// const h = Math.min(this.dimensions[1], (x2 - x1) / 2);
const h = (x2 - x1) / 2;
Expand Down Expand Up @@ -92,8 +92,8 @@ const Arcs1DTrack = (HGC, ...args) => {
}

drawEllipse(graphics, item, heightScale, opacityScale, storePolyStr) {
const x1 = this._xScale(item.xStart);
const x2 = this._xScale(item.xEnd);
const x1 = this._xScale(item.xStart || item.chrOffset + item.fields[1]);
const x2 = this._xScale(item.xEnd || item.chrOffset + item.fields[2]);

const h = heightScale(item.fields[2] - +item.fields[1]);
const r = (x2 - x1) / 2;
Expand Down

0 comments on commit 70e7db5

Please sign in to comment.