Adjust Beat Prompt widget layout
This commit is contained in:
@@ -44,6 +44,11 @@ function injectCSS() {
|
|||||||
.dh3bp-root {
|
.dh3bp-root {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: auto;
|
||||||
|
pointer-events: auto;
|
||||||
color: #e8e8e8;
|
color: #e8e8e8;
|
||||||
font: 12px/1.35 "Segoe UI", sans-serif;
|
font: 12px/1.35 "Segoe UI", sans-serif;
|
||||||
padding: 8px 10px 10px;
|
padding: 8px 10px 10px;
|
||||||
@@ -75,6 +80,7 @@ function injectCSS() {
|
|||||||
}
|
}
|
||||||
.dh3bp-list {
|
.dh3bp-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 1 1 auto;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
@@ -516,8 +522,12 @@ function setupNode(node) {
|
|||||||
setValue: () => {},
|
setValue: () => {},
|
||||||
serialize: false,
|
serialize: false,
|
||||||
getMinHeight: () => 180,
|
getMinHeight: () => 180,
|
||||||
|
hideOnZoom: false,
|
||||||
|
});
|
||||||
|
widget.computeLayoutSize = () => ({
|
||||||
|
minHeight: Math.max(220, node.size?.[1] || DEFAULT_H),
|
||||||
|
minWidth: Math.max(MIN_W, node.size?.[0] || DEFAULT_W),
|
||||||
});
|
});
|
||||||
widget.computeLayoutSize = () => ({ minHeight: 180, minWidth: 1 });
|
|
||||||
applyAdaptiveCanvasOnly(widget);
|
applyAdaptiveCanvasOnly(widget);
|
||||||
|
|
||||||
node.size[0] = Math.max(node.size[0] || 0, DEFAULT_W);
|
node.size[0] = Math.max(node.size[0] || 0, DEFAULT_W);
|
||||||
|
|||||||
Reference in New Issue
Block a user