remove all the logic around fitviewport limitations, which doesn't seem to be requured. For some reason (modeler as any).constructor.name return '_9' on the dev server, rather than returning 'Modeler', 'Viewer' etal ...

This commit is contained in:
danfunk 2023-07-06 20:03:30 -04:00
parent 475417b9a6
commit e099fc0edc
1 changed files with 1 additions and 14 deletions

View File

@ -429,20 +429,7 @@ export default function ReactDiagramEditor({
// only get the canvas if the dmn active viewer is actually
// a Modeler and not an Editor which is what it will be when we are
// actively editing a decision table
if ((modeler as any).constructor.name === 'Modeler') {
canvas.zoom(FitViewport, 'auto');
console.log('Zooming the viewport for modeler');
} else if ((modeler as any).constructor.name === 'Viewer') {
canvas.zoom(FitViewport, 'auto');
console.log('Zooming the viewport for the viewer');
} else {
console.log(
'Not zooming the viewport for ',
(modeler as any).constructor.name,
modeler,
(modeler as any).constructor.constructor
);
}
canvas.zoom(FitViewport, 'auto');
// highlighting a field
// Option 3 at: