Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Some artifacts when clicking on diagram (Read 340 times)
Anna Malashkina
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Sep 22nd, 2019
Some artifacts when clicking on diagram
Dec 6th, 2019 at 1:48pm
Print Post  
Hi all,

I set diagram behavior as "do nothing":
diagram.setBehavior(MindFusion.Diagramming.Behavior.DoNothing);

But I still have node selected (ports became visible) when I click on it. Also I have some strange  artifacts (see example attached), it looks like some selected nodes a duplicated with an offset. Is it possible to turn it off?
  

artifacts.png ( 7 KB | 24 Downloads )
artifacts.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2164
Joined: Oct 19th, 2005
Re: Some artifacts when clicking on diagram
Reply #1 - Dec 10th, 2019 at 8:34am
Print Post  
Hi Anna,

Try this -

Code
Select All
var originalOnClick = Diagram.prototype.onClick;
Diagram.prototype.onClick = function (position, button)
{
	if (this.getBehavior() == Behavior.DoNothing)
	{
		var clickedItem = this.getItemAt(position, true);
		this.raiseClicked(clickedItem, position, button);
	}
	else
	{
		originalOnClick.apply(this, [position, button]);
	}
};
 



Quote:
But I still have node selected (ports became visible) when I click on it. Also I have some strange  artifacts (see example attached), it looks like some selected nodes a duplicated with an offset. Is it possible to turn it off?


This could be the shadow effect, or otherwise the control might not have repainted correctly after some modification of yours (e.g. if you assign to bounds field directly instead of calling setBounds, or a property setter of ours omits invalidating); try calling diagram.invalidate() to do a full repaint.

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