mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Fixed backGroundUrl
Former-commit-id: e2628694c61f734f52b3ac6f2ffab6c9f1b39b55
This commit is contained in:
parent
8e4ef972d8
commit
d33a23526c
@ -369,9 +369,10 @@ export default class VisualConsole {
|
|||||||
public render(prevProps: VisualConsoleProps | null = null): void {
|
public render(prevProps: VisualConsoleProps | null = null): void {
|
||||||
if (prevProps) {
|
if (prevProps) {
|
||||||
if (prevProps.backgroundURL !== this.props.backgroundURL) {
|
if (prevProps.backgroundURL !== this.props.backgroundURL) {
|
||||||
this.containerRef.style.backgroundImage = `url(${
|
this.containerRef.style.backgroundImage =
|
||||||
this.props.backgroundURL
|
this.props.backgroundURL !== null
|
||||||
})`;
|
? `url(${this.props.backgroundURL})`
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
if (prevProps.backgroundColor !== this.props.backgroundColor) {
|
if (prevProps.backgroundColor !== this.props.backgroundColor) {
|
||||||
this.containerRef.style.backgroundColor = this.props.backgroundColor;
|
this.containerRef.style.backgroundColor = this.props.backgroundColor;
|
||||||
@ -380,9 +381,11 @@ export default class VisualConsole {
|
|||||||
this.resizeElement(this.props.width, this.props.height);
|
this.resizeElement(this.props.width, this.props.height);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.containerRef.style.backgroundImage = `url(${
|
this.containerRef.style.backgroundImage =
|
||||||
this.props.backgroundURL
|
this.props.backgroundURL !== null
|
||||||
})`;
|
? `url(${this.props.backgroundURL})`
|
||||||
|
: null;
|
||||||
|
|
||||||
this.containerRef.style.backgroundColor = this.props.backgroundColor;
|
this.containerRef.style.backgroundColor = this.props.backgroundColor;
|
||||||
this.resizeElement(this.props.width, this.props.height);
|
this.resizeElement(this.props.width, this.props.height);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user