@tradecanvas/core 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -434,7 +434,12 @@ var ee = class {
434
434
  clampOffset() {
435
435
  if (this.state.chartRect.width <= 0) return;
436
436
  let e = this.state.barWidth + this.state.barSpacing, t = this.dataLength * e, n = this.rightMarginBars * e, r = t - this.state.chartRect.width + n, i, a;
437
- r > 0 ? (i = -(this.state.chartRect.width * .5), a = r) : (i = r, a = r), this.state.offset = f(this.state.offset, i, a);
437
+ if (r > 0) i = -(this.state.chartRect.width * .5), a = r;
438
+ else {
439
+ let e = this.state.chartRect.width * .5;
440
+ i = r - e, a = r + e;
441
+ }
442
+ this.state.offset = f(this.state.offset, i, a);
438
443
  }
439
444
  updateVisibleRange() {
440
445
  let e = this.state.barWidth + this.state.barSpacing;