Add will-change
This commit is contained in:
parent
3ac40fb3d7
commit
600d3551f4
2 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ class ServerConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
_connect() {
|
_connect() {
|
||||||
|
clearTimeout(this._reconnectTimer);
|
||||||
if (this._isConnected() || this._isConnecting()) return;
|
if (this._isConnected() || this._isConnecting()) return;
|
||||||
const ws = new WebSocket(this._endpoint());
|
const ws = new WebSocket(this._endpoint());
|
||||||
ws.binaryType = 'arraybuffer';
|
ws.binaryType = 'arraybuffer';
|
||||||
|
@ -17,7 +18,6 @@ class ServerConnection {
|
||||||
ws.onclose = e => this._onDisconnect();
|
ws.onclose = e => this._onDisconnect();
|
||||||
ws.onerror = e => console.error(e);
|
ws.onerror = e => console.error(e);
|
||||||
this._socket = ws;
|
this._socket = ws;
|
||||||
clearTimeout(this._reconnectTimer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_isConnected() {
|
_isConnected() {
|
||||||
|
|
|
@ -301,6 +301,7 @@ x-dialog x-background {
|
||||||
background: rgba(0, 0, 0, 0.61);
|
background: rgba(0, 0, 0, 0.61);
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
transition: opacity 300ms;
|
transition: opacity 300ms;
|
||||||
|
will-change: opacity;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,6 +314,7 @@ x-dialog x-paper {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
transition: transform 300ms;
|
transition: transform 300ms;
|
||||||
|
will-change: transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
x-dialog:not([show]) {
|
x-dialog:not([show]) {
|
||||||
|
|
Loading…
Reference in a new issue