mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 02:24:15 +00:00
Feature/fix diagram zoom (#378)
* Revert "set undefined values to null rjsf form data w/ burnettk (#336)" This reverts commit cca9b147f6648b2aa0717c7859ce88056640f4a8. * Quick test to check if calls are happening correctly to resize the diagram. * Quick test to check if calls are happening correctly to resize the diagram. * 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 ... * drop console log * Clean up comments. --------- Co-authored-by: Jakub Sokołowski <jakub@status.im> Co-authored-by: jasquat <jasquat@users.noreply.github.com> Co-authored-by: burnettk <burnettk@users.noreply.github.com> Co-authored-by: Madhurya Liyanage <liyanagemadhurya@gmail.com>
This commit is contained in:
parent
746a41c524
commit
1a6a2c0ae9
@ -425,17 +425,7 @@ export default function ReactDiagramEditor({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const canvas = (modeler as any).get('canvas');
|
const canvas = (modeler as any).get('canvas');
|
||||||
|
canvas.zoom(FitViewport, 'auto'); // Concerned this might bug out somehow.
|
||||||
// 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');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((modeler as any).constructor.name === 'Viewer') {
|
|
||||||
canvas.zoom(FitViewport, 'auto');
|
|
||||||
}
|
|
||||||
|
|
||||||
// highlighting a field
|
// highlighting a field
|
||||||
// Option 3 at:
|
// Option 3 at:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user