#584 attributeChangedCallback changed callback changes
This commit is contained in:
@@ -87,10 +87,10 @@ export class ToolButton extends HTMLElement {
|
|||||||
this.$img.setAttribute('src', newValue);
|
this.$img.setAttribute('src', newValue);
|
||||||
break;
|
break;
|
||||||
case 'pressed':
|
case 'pressed':
|
||||||
if (newValue) {
|
if (newValue === null) {
|
||||||
this.$div.classList.add('pressed');
|
|
||||||
} else {
|
|
||||||
this.$div.classList.remove('pressed');
|
this.$div.classList.remove('pressed');
|
||||||
|
} else {
|
||||||
|
this.$div.classList.add('pressed');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'size':
|
case 'size':
|
||||||
@@ -145,7 +145,7 @@ export class ToolButton extends HTMLElement {
|
|||||||
if (value) {
|
if (value) {
|
||||||
this.setAttribute('pressed', 'true');
|
this.setAttribute('pressed', 'true');
|
||||||
} else {
|
} else {
|
||||||
this.removeAttribute('pressed', '');
|
this.removeAttribute('pressed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -165,7 +165,7 @@ export class ToolButton extends HTMLElement {
|
|||||||
if (value) {
|
if (value) {
|
||||||
this.setAttribute('disabled', 'true');
|
this.setAttribute('disabled', 'true');
|
||||||
} else {
|
} else {
|
||||||
this.removeAttribute('disabled', '');
|
this.removeAttribute('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user