2 Commits

Author SHA1 Message Date
1fc79c3ba2 1.0.65 2021-03-09 13:41:17 +00:00
cafe63348b fix(core): update 2021-03-09 13:41:16 +00:00
3 changed files with 13 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@uptimelink/webwidget", "name": "@uptimelink/webwidget",
"version": "1.0.64", "version": "1.0.65",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@uptimelink/webwidget", "name": "@uptimelink/webwidget",
"version": "1.0.64", "version": "1.0.65",
"private": false, "private": false,
"description": "the webwidget for public use of uptimelink", "description": "the webwidget for public use of uptimelink",
"main": "dist_ts_web/index.js", "main": "dist_ts_web/index.js",

View File

@ -13,6 +13,9 @@ export class UptimelinkWebwidget extends DeesElement {
@property() @property()
public isFocused = false; public isFocused = false;
@property()
public isElevated = false;
@property() @property()
public showExpanded: boolean = false; public showExpanded: boolean = false;
@ -30,7 +33,7 @@ export class UptimelinkWebwidget extends DeesElement {
position: relative; position: relative;
display: block; display: block;
height: 30px; height: 30px;
z-index:10; z-index: ${this.isElevated ? '10' : 'auto'} ;
} }
.mainbox { .mainbox {
position: relative; position: relative;
@ -154,6 +157,7 @@ export class UptimelinkWebwidget extends DeesElement {
await this.updateComplete; await this.updateComplete;
const mainbox: HTMLDivElement = this.shadowRoot.querySelector('.mainbox'); const mainbox: HTMLDivElement = this.shadowRoot.querySelector('.mainbox');
mainbox.onmouseenter = async () => { mainbox.onmouseenter = async () => {
this.isElevated = true;
this.isFocused = true; this.isFocused = true;
await domtools.DomTools.getGlobalDomToolsSync().convenience.smartdelay.delayFor(200); await domtools.DomTools.getGlobalDomToolsSync().convenience.smartdelay.delayFor(200);
if (!this.isFocused) { if (!this.isFocused) {
@ -161,11 +165,16 @@ export class UptimelinkWebwidget extends DeesElement {
} }
this.showExpanded = true; this.showExpanded = true;
await this.performUpdate(); await this.performUpdate();
await domtools.DomTools.getGlobalDomToolsSync().convenience.smartdelay.delayFor(50); await (await this.domtoolsPromise).convenience.smartdelay.delayFor(50);
const expandedDiv = this.shadowRoot.querySelector('.expanded') as HTMLElement; const expandedDiv = this.shadowRoot.querySelector('.expanded') as HTMLElement;
expandedDiv.style.opacity = '1'; expandedDiv.style.opacity = '1';
}; };
mainbox.onmouseleave = async () => { mainbox.onmouseleave = async () => {
(await this.domtoolsPromise).convenience.smartdelay.delayFor(200).then(() => {
if (!this.isFocused) {
this.isElevated = false;
}
});
if (!this.showExpanded) { if (!this.showExpanded) {
this.isFocused = false; this.isFocused = false;
return; return;