Merge pull request #617 from SVG-Edit/issues/599
#599 TopPanel x,y and dimension for element, doesn't work issue fixed
This commit is contained in:
@@ -184,6 +184,19 @@ export class SESpinInput extends HTMLElement {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
connectedCallback () {
|
connectedCallback () {
|
||||||
|
const shadow = this.$input.shadowRoot;
|
||||||
|
const childNodes = Array.from(shadow.childNodes);
|
||||||
|
childNodes.forEach( (childNode) => {
|
||||||
|
if(childNode?.id === "input") {
|
||||||
|
childNode.addEventListener('keyup', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
if (!isNaN(e.target.value)) {
|
||||||
|
this.value = e.target.value;
|
||||||
|
this.dispatchEvent(this.$event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
this.$input.addEventListener('change', (e) => {
|
this.$input.addEventListener('change', (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.value = e.target.value;
|
this.value = e.target.value;
|
||||||
|
|||||||
Reference in New Issue
Block a user