Skip to content

Commit bf4a2cc

Browse files
committed
Reactor backgrounds
- Make reactor backgrounds respect the theme - Change the reactor infrastructure to overwrite the canvas with 255,255,255,0 (transparent), rather than 255,255,255,1 (WHITE), pixels, to make reactor images and values look the same as they would at the REPL
1 parent 1583a83 commit bf4a2cc

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/web/css/editor.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket-region {
480480
cursor: pointer;
481481
}
482482

483+
div.repl-animation {
484+
background-color: var(--background) !important;
485+
}
486+
483487
div.trace {
484488
overflow-x: auto;
485489
padding-top: 1px;

src/web/js/repl-ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
});
343343
var currentZIndex = 15000;
344344
runtime.setParam("current-animation-port", function(dom, title, closeCallback) {
345-
var animationDiv = $("<div>").css({"z-index": currentZIndex + 1});
345+
var animationDiv = $("<div class='repl-animation'>").css({"z-index": currentZIndex + 1});
346346
animationDivs.push(animationDiv);
347347
output.append(animationDiv);
348348
function onClose() {

src/web/js/trove/world.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@
532532
}
533533
var ctx = reusableCanvas.getContext("2d");
534534
ctx.save();
535-
ctx.fillStyle = "rgba(255,255,255,1)";
535+
ctx.fillStyle = "rgba(255,255,255,0)";
536536
ctx.fillRect(0, 0, width, height);
537537
ctx.restore();
538538
theImage.render(ctx, 0, 0);

0 commit comments

Comments
 (0)