Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boolean Socket... #22

Closed
TechplexEngineer opened this issue Jul 29, 2011 · 5 comments
Closed

Boolean Socket... #22

TechplexEngineer opened this issue Jul 29, 2011 · 5 comments

Comments

@TechplexEngineer
Copy link
Member

Boolean sockets default list does not remove when a socket block is dragged to its place.

@TechplexEngineer
Copy link
Member Author

I added:
drop_target.find('select').remove();

just after:
drop_target.find('input').remove();

in drag.js ~298

Seems to fix the bool problem, now looking for a way to put the true/false drop down back once a socket is removed.

@TechplexEngineer
Copy link
Member Author

drag.js ~203

this provides support for the boolean select menu, when a socket is dragged out

if (drag_target.parent().is('.socket')){
        var classes = drag_target.parent().attr('class');

        classes = classes.replace("socket","").trim();
        // console.log(classes);

        //ADDED: brings back the boolean dialog
        if(classes == "boolean")
            drag_target.parent().append('<select><option>true</option><option>false</option></select>');
        else if(!classes || classes=="string")
        {
            classes = '\"text\"'
            drag_target.parent().append('<input type="'+classes+'"/>');
        }
        else
            drag_target.parent().append('<input type="'+classes+'"/>');

    }

@TechplexEngineer
Copy link
Member Author

Also, it seems that socket blocks in a boolean socket aren't saved.

dethe pushed a commit that referenced this issue Jul 30, 2011
@dethe
Copy link
Member

dethe commented Jul 30, 2011

I used a modified version of the fix you propose, thanks! It seems to save and restore boolean sockets now too, please let me know if you see further problems.

@dethe dethe closed this as completed Jul 30, 2011
@TechplexEngineer
Copy link
Member Author

Yup save seems to work properly. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants