Closed Nancy-Salpepi closed 6 months ago
This patch gets rid of some transient white rectangles to the left of the field sign
Subject: [PATCH] Remove readonly from blackBoxBounds, see https://github.com/phetsims/circuit-construction-kit-black-box-study/issues/78
---
Index: js/common/view/SelectorNode.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/common/view/SelectorNode.ts b/js/common/view/SelectorNode.ts
--- a/js/common/view/SelectorNode.ts (revision 78ae4d2394a4e3bfbde4dfba712b391944201bec)
+++ b/js/common/view/SelectorNode.ts (date 1709216057663)
@@ -127,8 +127,8 @@
// enable/disable arrow buttons
const updateEnabled = () => {
- incrementButton.enabled = numberProperty.value + 1 <= rangeProperty.value.max;
- decrementButton.enabled = numberProperty.value - 1 >= rangeProperty.value.min;
+ // incrementButton.enabled = numberProperty.value + 1 <= rangeProperty.value.max;
+ // decrementButton.enabled = numberProperty.value - 1 >= rangeProperty.value.min;
};
// synchronize with number value
I was surprised to see that, after removing almost everything except the lunch button and the background and converting the background to be a solid rectangle, I still see a similar artifact (note the tiny white pixel in the top left)
It sometimes correlates with the launch action.
Using the scenery inspector, I see spurious white vertical lines in unexpected places. The mouse cursor is in the top left quadrant:
I am still seeing the dot intermittently with the sim mostly decimated (no launch button either)
UPDATE: It looks like the white dot did not capture in the screenshot, but it is there on my rendering.
With @jonathanolson's help, we addressed one of the 3 bugs above. We added a layerSplit to fix the problem and it fixed the field sign one. There are still 2 different bad rectangles in the top left that need investigation.
The larger rectangle appears to be the sceneryTextSizeContainer
(or one of its descendants) because when I deleted the sceneryTextSizeContainer
from the DOM, the large rectangle disappeared.
The larger rectangle appears to be the sceneryTextSizeContainer (or one of its descendants) because when I deleted the sceneryTextSizeContainer from the DOM, the large rectangle disappeared.
That was incorrect.
I found the background gradient was 1x1 and being scaled. I changed it to have a larger geometry and that appears to have corrected the safari rendering artifacts. I tried to color match the prior version, but would be good for @matthew-blackman to double check. Ready for review. Close if ok.
This is fixed for me in Safari. Nice work! I reviewed the changed with @samreid and it looks like this was an issue with how I created the GradientBackgroundNode dimensions. We confirmed that it will not affect common code. Closing.
Test device MacBook Air M1 chip
Operating System 14.3.1
Browser Safari 17.3.1
Problem description I noticed that sometimes, especially in fast mode, I am seeing a white square in the upper left corner of the screen when a button is pressed and a white bar in the field area when a projectile is launched. @matthew-blackman was also able to reproduce.
I do not see this issue in mac + chrome.
Visuals
https://github.com/phetsims/projectile-data-lab/assets/87318828/26d1e52e-d853-424a-b5ee-0b2c608f790f