rand dart fix
This commit is contained in:
@@ -10,17 +10,9 @@ void newWindow(
|
||||
}) {
|
||||
final screen = html.window.screen;
|
||||
double top = 0;
|
||||
if (dy != null) {
|
||||
top = dy;
|
||||
} else if (screen.height != null) {
|
||||
top = (screen.height - height) / 2;
|
||||
}
|
||||
top = dy;
|
||||
double left = 0;
|
||||
if (dx != null) {
|
||||
left = dx;
|
||||
} else if (screen.width != null) {
|
||||
left = (screen.width - width) / 2;
|
||||
}
|
||||
left = dx;
|
||||
final sb = StringBuffer();
|
||||
sb.write("height=");
|
||||
sb.write(height);
|
||||
|
||||
@@ -64,8 +64,6 @@ class NewWindow {
|
||||
}
|
||||
|
||||
static NewWindow fromMap(Map<String, dynamic> map) {
|
||||
if (map == null) return null;
|
||||
|
||||
return NewWindow(
|
||||
url: map['url'],
|
||||
width: map['width'],
|
||||
@@ -114,8 +112,8 @@ void createWindow(NewWindow window) {
|
||||
window.url,
|
||||
window.width,
|
||||
window.height,
|
||||
dx: window?.offsetX,
|
||||
dy: window?.offsetY,
|
||||
name: window?.name,
|
||||
dx: window.offsetX,
|
||||
dy: window.offsetY,
|
||||
name: window.name,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user