flocc 0.5.20 → 0.5.21

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/flocc.es.js CHANGED
@@ -4626,7 +4626,7 @@ var LineChartRenderer = /** @class */ (function (_super) {
4626
4626
  if (opts.autoScroll && t >= width) {
4627
4627
  x -= t - width;
4628
4628
  }
4629
- else if (opts.autoScale && t >= width) {
4629
+ else if (opts.autoScale) {
4630
4630
  x *= width / t;
4631
4631
  }
4632
4632
  return x | 0;
@@ -4674,7 +4674,7 @@ var LineChartRenderer = /** @class */ (function (_super) {
4674
4674
  context.restore();
4675
4675
  // draw time values for horizontal axis
4676
4676
  var min = opts.autoScroll && t >= width ? t - width : 0;
4677
- var max = opts.autoScale && t >= width ? t : width;
4677
+ var max = opts.autoScale ? Math.max(t, 5) : width;
4678
4678
  var timeRange = { min: min, max: max };
4679
4679
  var timeMarkers = extractRoundNumbers(timeRange);
4680
4680
  context.save();
@@ -5238,6 +5238,6 @@ var Heatmap = /** @class */ (function (_super) {
5238
5238
  /**
5239
5239
  * The current version of the Flocc library.
5240
5240
  */
5241
- var version = "0.5.20";
5241
+ var version = "0.5.21";
5242
5242
 
5243
5243
  export { ASCIIRenderer, Agent, CanvasRenderer, Colors, Environment, GridEnvironment, Heatmap, Histogram, KDTree, LineChartRenderer, Network, NumArray, Rule, TableRenderer, Terrain, version as VERSION, Vector, utils };
package/dist/flocc.js CHANGED
@@ -4632,7 +4632,7 @@
4632
4632
  if (opts.autoScroll && t >= width) {
4633
4633
  x -= t - width;
4634
4634
  }
4635
- else if (opts.autoScale && t >= width) {
4635
+ else if (opts.autoScale) {
4636
4636
  x *= width / t;
4637
4637
  }
4638
4638
  return x | 0;
@@ -4680,7 +4680,7 @@
4680
4680
  context.restore();
4681
4681
  // draw time values for horizontal axis
4682
4682
  var min = opts.autoScroll && t >= width ? t - width : 0;
4683
- var max = opts.autoScale && t >= width ? t : width;
4683
+ var max = opts.autoScale ? Math.max(t, 5) : width;
4684
4684
  var timeRange = { min: min, max: max };
4685
4685
  var timeMarkers = extractRoundNumbers(timeRange);
4686
4686
  context.save();
@@ -5244,7 +5244,7 @@
5244
5244
  /**
5245
5245
  * The current version of the Flocc library.
5246
5246
  */
5247
- var version = "0.5.20";
5247
+ var version = "0.5.21";
5248
5248
 
5249
5249
  exports.ASCIIRenderer = ASCIIRenderer;
5250
5250
  exports.Agent = Agent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flocc",
3
- "version": "0.5.20",
3
+ "version": "0.5.21",
4
4
  "description": "Agent-based modeling in JavaScript in the browser or server.",
5
5
  "main": "dist/flocc.js",
6
6
  "module": "dist/flocc.es.js",