#8041 Fixed module graph height

This commit is contained in:
Daniel Maya 2021-10-15 11:43:43 +02:00
parent af9711ec3d
commit 9976783266
2 changed files with 4 additions and 14 deletions

View File

@ -327,6 +327,10 @@ final class ModuleGraph extends Item
$width = (int) $data['width'];
$height = (int) $data['height'];
if ($height == 0) {
$height = 15;
}
// Custom graph.
if (empty($customGraphId) === false) {
$customGraph = \db_get_row('tgraph', 'id_graph', $customGraphId);

View File

@ -88,12 +88,6 @@ export function moduleGraphPropsDecoder(
export default class ModuleGraph extends Item<ModuleGraphProps> {
protected createDomElement(): HTMLElement {
const element = document.createElement("div");
//element.className = "module-graph";
//element.style.backgroundImage = `url(${this.props.html})`;
//element.style.backgroundRepeat = "no-repeat";
//element.style.backgroundSize = `${this.props.width}px ${
// this.props.height
//}px`;
element.innerHTML = this.props.html;
element.className = "module-graph";
@ -128,18 +122,10 @@ export default class ModuleGraph extends Item<ModuleGraphProps> {
}
}
// element.innerHTML = this.props.html;
return element;
}
protected updateDomElement(element: HTMLElement): void {
//element.style.backgroundImage = `url(${this.props.html})`;
//element.style.backgroundRepeat = "no-repeat";
//element.style.backgroundSize = `${this.props.width}px ${
// this.props.height
//}px`;
element.innerHTML = this.props.html;
// Remove the overview graph.