Skip to content

Conversation

@anjali142
Copy link

@anjali142 anjali142 commented Jan 18, 2019

added function changeColor to change color of elements to the color passed.

//function to change color of node and edges
 changeColor(element,colour)
        {
            this.cy.css({
                'background-color': (for(var j=0;j<element.length;j++)
                (ele.isNode()==1)?node.color=colour:edge.color=colour)
            });
        }
// console.log(g);
// obj = {name:'saurabh', shape: 'octagon', color: 'cyan', width: '300px', height: '400px'};
// g.addNode(obj);
// g.addNode(obj);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the commented part.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sir

@aashish-ak
Copy link
Member

Hey @anjali142 , do not write code in the PR and commit message, describe what you've done in a small paragraph. Include any screenshots if necessary. Make the necessary changes and commit again.

@anjali142 anjali142 changed the title added the function changeColor...please review it added the function changeColor... Jan 18, 2019
@aashish-ak aashish-ak changed the title added the function changeColor... added functionionality to change color of elements. Jan 18, 2019
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

Successfully merging this pull request may close these issues.

2 participants