Skip to content

Commit

Permalink
fix: HorizontalBarChart X bounds check was incorrect.
Browse files Browse the repository at this point in the history
  • Loading branch information
CatchABus committed Sep 8, 2020
1 parent 6a3c239 commit b26e2c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"clean": "rimraf ./plugin/**/*.d.ts ./plugin/**/*.js ./plugin/**/*.js.map plugin/node_modules plugin/package-lock.json",
"build": "cp README.md plugin/ && rm -f .tsbuildinfo && npm run tsc",
"setup": "npm i && ts-patch install",
"demo.ios": "npm i && npm run tsc && cd demo && tns run ios",
"demo.android": "npm i && npm run tsc && cd demo && tns run android",
"demo.ios": "npm i && npm run tsc && cd demo && ns run ios",
"demo.android": "npm i && npm run tsc && cd demo && ns run android",
"clean.demo": "rimraf demo/hooks demo/node_modules demo/platforms",
"demo.ios.vue": "npm i && npm run tsc && cd demo_vue && tns run ios",
"demo.android.vue": "npm i && npm run tsc && cd demo_vue && tns run android",
"demo.ios.vue": "npm i && npm run tsc && cd demo_vue && ns run ios",
"demo.android.vue": "npm i && npm run tsc && cd demo_vue && ns run android",
"clean.demo.vue": "rimraf demo_vue/hooks demo_vue/node_modules demo_vue/platforms",
"plugin.watch.tsc": "npm run tsc -- -w",
"plugin.watch": "npm run plugin.watch.tsc",
Expand Down
4 changes: 2 additions & 2 deletions src/charting/renderer/HorizontalBarChartRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class HorizontalBarChartRenderer extends BarChartRenderer {
break;
}

if (!this.mViewPortHandler.isInBoundsX(buffer.buffer[isInverted ? j : (j + 2)])) {
if (!this.mViewPortHandler.isInBoundsX(buffer.buffer[isInverted ? (j + 2) : j])) {
continue;
}

Expand Down Expand Up @@ -221,7 +221,7 @@ export class HorizontalBarChartRenderer extends BarChartRenderer {
break;
}

if (!this.mViewPortHandler.isInBoundsX(buffer.buffer[isInverted ? bufferIndex : (bufferIndex + 2)])) {
if (!this.mViewPortHandler.isInBoundsX(buffer.buffer[isInverted ? (bufferIndex + 2) : bufferIndex])) {
continue;
}

Expand Down

0 comments on commit b26e2c7

Please sign in to comment.