Skip to content

Commit a7ba472

Browse files
committed
TEMP: minimap debug overlay
1 parent a8f2c97 commit a7ba472

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

node-editor-building-blocks.slint

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,29 @@ export component Minimap inherits Rectangle {
428428
border-width: root.minimap-viewport-border-width;
429429
}
430430

431+
// TEMP DEBUG: show runtime geometry values
432+
Rectangle {
433+
x: 0px;
434+
y: 0px;
435+
width: 100%;
436+
height: 100%;
437+
background: transparent;
438+
439+
Text {
440+
x: 2px;
441+
y: 2px;
442+
text: "vx=" + round(root.viewport-x / 1px) + " z=" + round(root.viewport-zoom * 100) / 100
443+
+ "\nvw=" + round(root.viewport-width / 1px) + " vh=" + round(root.viewport-height / 1px)
444+
+ "\nvis=" + round(root.visible-min-x / 1px) + ".." + round(root.visible-max-x / 1px)
445+
+ "\ngr=" + round(root.graph-min-x / 1px) + ".." + round(root.graph-max-x / 1px)
446+
+ "\ns=" + round(root.scale * 1000) / 1000
447+
+ " rw=" + round(root.viewport-indicator-width / 1px);
448+
color: #ffff00;
449+
font-size: 10px;
450+
font-weight: 700;
451+
}
452+
}
453+
431454
TouchArea {
432455
width: 100%;
433456
height: 100%;

0 commit comments

Comments
 (0)