Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Blinking on resizing (Read 1075 times)
Anna Malashkina
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Sep 22nd, 2019
Blinking on resizing
Dec 6th, 2019 at 11:46am
Print Post  
Hi,

We use the following code to redraw on resize:
const rect = diagram.getContentBounds().clone();
diagram.zoomToRect(rect);
diagram.invalidate();

But it leads to diagram blinking during resizing. Is it possible to avoid blinking?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Blinking on resizing
Reply #1 - Dec 9th, 2019 at 10:54am
Print Post  
Hi Anna,

Check if it's any better if you replace invalidate() call with repaint(), the latter doing an immediate repaint of the canvas. Also assuming you have diagram.setVirtualScroll(true) set, otherwise there are are lot of DOM operations like resizing and scrolling that might interfere before the repaint.

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