From 8d405f64e3b9e45172bfcd040b0ce8f1da1773e8 Mon Sep 17 00:00:00 2001 From: chrisklus Date: Wed, 23 Feb 2022 12:10:12 -0700 Subject: [PATCH] Fix shifting number line for when median bars are over 0, see https://github.com/phetsims/center-and-spread/issues/6 --- js/common/view/DotPlotNode.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/common/view/DotPlotNode.ts b/js/common/view/DotPlotNode.ts index 499ab366..ee64e94b 100644 --- a/js/common/view/DotPlotNode.ts +++ b/js/common/view/DotPlotNode.ts @@ -120,6 +120,10 @@ class DotPlotNode extends Node { dotNodeGroup.disposeElement( viewNode ); } ); + // TODO from CK: Sorry for another one Sam! Design meeting is starting shortly and this was to fix the buggy + // shifting number line from when the median bars extend to 0 and + this.localBounds = this.localBounds.copy(); + this.medianBarsNode = new MedianBarsNode( { notchDirection: 'down', barStyle: 'continuous'