Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Remove shapenode selection background when selected (Read 1488 times)
Alex_Z
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: May 4th, 2017
Remove shapenode selection background when selected
May 4th, 2017 at 5:50pm
Print Post  
Hi,

When we select a shapenode in NodeListView, it will have the selection box background, is there any way to remove it?
Thanks!
  

background.png ( 2 KB | 103 Downloads )
background.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Remove shapenode selection background when selected
Reply #1 - May 4th, 2017 at 6:45pm
Print Post  
Hi,

There's no public API for it, but you could replace the colors in the function used to select items -

Code
Select All
NodeListView.prototype.selectBox = function (box)
{
    for (var i = 0, l = this.boxes.length; i < l; i++)
    {
        if (this.boxes[i] === box)
        {
            this.draggedNode = this.items[i].clone();
            document.body.style.cursor = 'pointer';
            this.boxes[i].pen = '#3366CC';
            this.boxes[i].brush = { type: 'SolidBrush', color: 'rgba(51,102,204,0.2)' };
        }
        else
        {
            this.boxes[i].pen = 'transparent';
            this.boxes[i].brush = { type: 'SolidBrush', color: 'transparent' };
        }
    }
    this.invalidate();
}; 



e.g. set the first set of colors to Transparent too, or apply smaller alpha value.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint