- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.JavaScript pack. It includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are more details and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Some artifacts when clicking on diagram
Read 94 times

Anna Malashkina   Offline
YaBB Newbies
*
Posts: 19
I Love MindFusion!


   
     
 
Some artifacts when clicking on diagram
Dec 6th, 2019 at 1:48pm
 
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 | 7 )
artifacts.png
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1912
Gender: male
tech.support


   
     
 
Re: Some artifacts when clicking on diagram
Reply #1 - Dec 10th, 2019 at 8:34am
 
Hi Anna,

Try this -

Code:
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
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print