Bpmn-js-diffing project

Hi,

From the url demo.bpmn.io/diff, the diff UI overlays are blinking and the diagram is shrinking over time.

I have downloaded the bpmn-js-diffing project. The blinking effect seems to be happening only after v0.11.0 in bpmn-navigated-viewer.

How can I prevent this blinking, shrinking effect when the project is using bpmn-navigated-viewer v0.12.0

Thanks.

I have the same problem on Firefox and Chrome

I did a code diff between bpmn-navigated-viewer v0.11.0 and v0.12.0 and realized that the function canvasObj._viewboxChanged is debounced. This is causing the blinking and shrinking of the diagram.

There is a way prevent canvasObj._viewboxChanged from getting debounced, by passing canvas.deferUpdate=false to the options parameter in Viewer.prototype._createDiagram. But there should be a way to pass this option while creating the bpmn viewer ?

Using the viewer object we reinitialize the method after the diagram is loaded to achieve the same effect as canvas.deferUpdate=false.

Code:

     var canvasObj = viewer.get('canvas');
    	canvasObj._viewboxChanged = function() {
    	  canvasObj._eventBus.fire('canvas.viewbox.changed', 
                                    { viewbox: canvasObj.viewbox(false) });
    	};

Hey @clinton_lobo,

thanks for the bug report and for spending time investigating the problem. And thanks @berndruecker for verifying it.

I created an issue for that here: https://github.com/bpmn-io/diagram-js/issues/125

Hi @pedesen,

I want to know which graph matching algorithms you are using in this project.

Checkout bpmn-js-differ, the library we are using under the hood.