Skip to content

Commit

Permalink
Quality of life changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spaaaacccee committed Oct 26, 2023
1 parent 8b59272 commit 8e22e2e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
6 changes: 5 additions & 1 deletion client/src/components/inspector/FullscreenProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export function FullscreenProgress() {
const messages = values(busy);
return (
<Backdrop
sx={{ ...acrylic, zIndex: (t) => t.zIndex.tooltip + 1 }}
sx={{
...acrylic,
zIndex: (t) => t.zIndex.tooltip + 1,
WebkitAppRegion: "drag",
}}
open={!!messages.length}
unmountOnExit
mountOnEnter
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/renderer/parser/parseTrace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ParseTraceWorkerReturnType,
} from "./parseTrace.worker";
import parseGridWorkerUrl from "./parseTrace.worker.ts?worker&url";
import { stringify } from "yaml";

export class ParseTraceWorker extends Worker {
constructor() {
Expand Down Expand Up @@ -36,7 +37,7 @@ export function useTraceParser(params: ParseTraceWorkerParameters) {
);
return output;
} catch (e) {
push("Error parsing", `${e}`);
push("Error parsing", `${stringify(e)}`);
}
}
}),
Expand Down
1 change: 0 additions & 1 deletion client/src/slices/layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export function useLayer<T extends Record<string, any> = Record<string, any>>(
layer,
setLayer: (newLayer: Layer<T>) => {
const mergedLayer = { ...layer, ...newLayer };
console.log(layer, newLayer, mergedLayer);
setLayers(({ layers: prev }) => ({
layers: map(prev, (l) =>
l.key === mergedLayer.key ? mergedLayer : l
Expand Down
17 changes: 17 additions & 0 deletions internal-renderers/src/d2-renderer/D2RendererWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,23 @@ export class D2RendererWorker extends EventEmitter<
ctx.imageSmoothingEnabled = false;
ctx.fillStyle = this.#options.backgroundColor;
ctx.fillRect(0, 0, tile.width, tile.height);

const x = 16;
const thickness = 1;
ctx.fillStyle = `rgba(127,127,127,0.25)`;
ctx.fillRect(
(tile.width - x) / 2,
(tile.height - thickness) / 2,
x,
thickness
);
ctx.fillRect(
(tile.width - thickness) / 2,
(tile.height - x) / 2,
thickness,
x
);

for (const { component } of sortBy(
this.#system.search({
minX: left,
Expand Down

0 comments on commit 8e22e2e

Please sign in to comment.