Skip to content

Commit a398c12

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

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

node-editor-building-blocks.slint

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

431+
// TEMP DEBUG: show live viewport values — positioned INSIDE minimap bottom
432+
Rectangle {
433+
x: 2px;
434+
y: 2px;
435+
width: root.minimap-width - 4px;
436+
height: 50px;
437+
background: white;
438+
Text {
439+
x: 4px;
440+
y: 4px;
441+
text: "pan=" + round(root.viewport-x / 1px) + "," + round(root.viewport-y / 1px)
442+
+ " zoom=" + round(root.viewport-zoom * 1000) / 1000
443+
+ "\nvis-x=" + round(root.visible-min-x / 1px) + ".." + round(root.visible-max-x / 1px)
444+
+ "\nvis-y=" + round(root.visible-min-y / 1px) + ".." + round(root.visible-max-y / 1px)
445+
+ "\nind=(" + round(root.viewport-indicator-x / 1px) + "," + round(root.viewport-indicator-y / 1px) + ") "
446+
+ round(root.viewport-indicator-width / 1px) + "x" + round(root.viewport-indicator-height / 1px);
447+
color: black;
448+
font-size: 11px;
449+
}
450+
}
451+
431452
TouchArea {
432453
width: 100%;
433454
height: 100%;

0 commit comments

Comments
 (0)