INNER CODE UNIT · JavaScript

constructShapeHtml

electronicarts/pbmpm · src/main.js:270

    function constructShapeHtml(shape, isSelected, isMouseOver)
    {
        let sizeHtml;

        if(shape.shape == sim.SimEnums.ShapeTypeCircle)
        {
            sizeHtml = `
                <input class='input' type='range' id='${shape.id}Radius' value='${shape.radius}' min='0' max='1000' step='1'/>
                <label class='input' id='${shape.id}RadiusLabel' for='${shape.id}Radius'>Radius: ${shape.radius}</label><br>
            `;
        }
        else
        {
            sizeHtml = `
                <input class='input' type='range' id='${shape.id}HalfSizeX' value='${shape.halfSize.x}' min='0' max='1000' step='1'/>
                <label class='input' id='${shape.id}HalfSizeXLabel' for='${shape.id}HalfSizeX'>Width: ${shape.halfSize.x}</label><br>

                <input class='input' type='range' id='${shape.id}HalfSizeY' value='${shape.halfSize.y}' min='0' max='1000' step='1'/>

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…