mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 10:15:31 +00:00
Remove window wrappers (#636)
* Remove parent wrapper, add filtering out closed windows * Add the rest of window manager changes (vscode ignores whitespace) * Make prettier happy
This commit is contained in:
parent
988e902f65
commit
fa50df7f6b
1 changed files with 12 additions and 19 deletions
|
|
@ -183,26 +183,19 @@ class WindowManager extends React.Component {
|
|||
left: 0
|
||||
};
|
||||
|
||||
const parentStyle = {
|
||||
position: "absolute",
|
||||
width: 0,
|
||||
height: 0,
|
||||
top: 0,
|
||||
left: 0
|
||||
};
|
||||
return (
|
||||
<div style={parentStyle}>
|
||||
{this.props.windowsInfo.map(w => (
|
||||
<div
|
||||
onMouseDown={e => this.handleMouseDown(w.key, e)}
|
||||
style={{ ...style, transform: `translate(${w.x}px, ${w.y}px)` }}
|
||||
key={w.key}
|
||||
>
|
||||
{this.props.windows[w.key]}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
const windows = this.props.windowsInfo.filter(
|
||||
w => this.props.windows[w.key]
|
||||
);
|
||||
|
||||
return windows.map(w => (
|
||||
<div
|
||||
key={w.key}
|
||||
onMouseDown={e => this.handleMouseDown(w.key, e)}
|
||||
style={{ ...style, transform: `translate(${w.x}px, ${w.y}px)` }}
|
||||
>
|
||||
{this.props.windows[w.key]}
|
||||
</div>
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue