Skip to content

Commit

Permalink
don't run setSelect() during init when width & height are 0. close #879.
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Oct 16, 2023
1 parent cf139ff commit 38f63de
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/uPlot.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5703,7 +5703,7 @@ function uPlot(opts, data, then) {
else
autoScaleX();

shouldSetSelect = select.show;
shouldSetSelect = select.show && (select.width > 0 || select.height > 0);
shouldSetCursor = shouldSetLegend = true;

_setSize(opts.width, opts.height);
Expand Down
2 changes: 1 addition & 1 deletion dist/uPlot.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5701,7 +5701,7 @@ function uPlot(opts, data, then) {
else
autoScaleX();

shouldSetSelect = select.show;
shouldSetSelect = select.show && (select.width > 0 || select.height > 0);
shouldSetCursor = shouldSetLegend = true;

_setSize(opts.width, opts.height);
Expand Down
2 changes: 1 addition & 1 deletion dist/uPlot.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -5704,7 +5704,7 @@ var uPlot = (function () {
else
autoScaleX();

shouldSetSelect = select.show;
shouldSetSelect = select.show && (select.width > 0 || select.height > 0);
shouldSetCursor = shouldSetLegend = true;

_setSize(opts.width, opts.height);
Expand Down
2 changes: 1 addition & 1 deletion dist/uPlot.iife.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/uPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -3163,7 +3163,7 @@ export default function uPlot(opts, data, then) {
else
autoScaleX();

shouldSetSelect = select.show;
shouldSetSelect = select.show && (select.width > 0 || select.height > 0);
shouldSetCursor = shouldSetLegend = true;

_setSize(opts.width, opts.height);
Expand Down

0 comments on commit 38f63de

Please sign in to comment.