Skip to content

⬅️ Back to Table of Contents

📄 StringEditor.js

📊 Analysis Summary

Metric Count
🔧 Functions 1
🧱 Classes 1
📦 Imports 2

📚 Table of Contents

🛠️ File Location:

📂 playground/editors/StringEditor.js

📦 Imports

Name Source
BaseNodeEditor ../BaseNodeEditor.js
createElementFromJSON ../NodeEditorUtils.js

Functions

StringEditor.getURL(): any

Returns: any

Code
getURL() {

        return this.stringNode.value;

    }

Classes

StringEditor

Class Code
export class StringEditor extends BaseNodeEditor {

    constructor() {

        const { element, inputNode } = createElementFromJSON( {
            inputType: 'string',
            inputConnection: false
        } );

        super( 'String', inputNode, 350 );

        element.addEventListener( 'changeInput', () => this.invalidate() );

        this.add( element );

    }

    get stringNode() {

        return this.value;

    }

    getURL() {

        return this.stringNode.value;

    }

}

Methods

getURL(): any
Code
getURL() {

        return this.stringNode.value;

    }