fix bugs and position on safari
This commit is contained in:
@@ -151,9 +151,9 @@ export class ExplorerButton extends HTMLElement {
|
||||
break;
|
||||
case 'disabled':
|
||||
if (newValue) {
|
||||
this.$div.classList.add('disabled');
|
||||
this.$overall.classList.add('disabled');
|
||||
} else {
|
||||
this.$div.classList.remove('disabled');
|
||||
this.$overall.classList.remove('disabled');
|
||||
}
|
||||
break;
|
||||
case 'lib':
|
||||
|
||||
@@ -47,7 +47,6 @@ template.innerHTML = `
|
||||
}
|
||||
.menu {
|
||||
position: absolute;
|
||||
top:-2px;
|
||||
left:32px;
|
||||
background: none !important;
|
||||
display:none;
|
||||
@@ -68,13 +67,14 @@ template.innerHTML = `
|
||||
</style>
|
||||
|
||||
<div class="overall">
|
||||
<div class="menu">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="menu-button">
|
||||
<img class="button-icon" src="./images/logo.svg" alt="icon">
|
||||
<div class="handle"></div>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
`;
|
||||
@@ -139,9 +139,9 @@ export class FlyingButton extends HTMLElement {
|
||||
break;
|
||||
case 'disabled':
|
||||
if (newValue) {
|
||||
this.$div.classList.add('disabled');
|
||||
this.$overall.classList.add('disabled');
|
||||
} else {
|
||||
this.$div.classList.remove('disabled');
|
||||
this.$overall.classList.remove('disabled');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -794,7 +794,7 @@ export const setLinkURLMethod = function (val) {
|
||||
if (elem.tagName !== 'a') {
|
||||
// See if parent is an anchor
|
||||
const parentsA = getParents(elem.parentNode, 'a');
|
||||
if (parentsA.length) {
|
||||
if (parentsA?.length) {
|
||||
elem = parentsA[0];
|
||||
} else {
|
||||
return;
|
||||
|
||||
@@ -875,7 +875,7 @@ export const ungroupSelectedElement = function () {
|
||||
return;
|
||||
}
|
||||
const parentsA = getParents(g.parentNode, 'a');
|
||||
if (parentsA.length) {
|
||||
if (parentsA?.length) {
|
||||
g = parentsA[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user