Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-8977

SWF Viewer - center function doesn't work when the whole node is visible

XMLWordPrintable

    • False
    • None
    • False
    • Hide
      1. Open a workflow in VSCode using the extension.
      2. Zoom in in order to not see the whole diagram like this:
      3. Open console in developer tools.
      4. Switch to active frame and call the following functions:
        var canvas = window.frames.canvas;
        var session = window.frames.editor.session;
        let startNewOrderNode = session.getNodeByName("StartNewOrder");
        canvas.center(startNewOrderNode.getUUID());
        

      Actual result

      The view is not centered.

      Expected result

      The view is centered.
      The node should be in the middle of the diagram.

      Show
      Open a workflow in VSCode using the extension. E.g.: purchase-order-deadline.sw.json Zoom in in order to not see the whole diagram like this: Open console in developer tools. Switch to active frame and call the following functions: var canvas = window.frames.canvas; var session = window.frames.editor.session; let startNewOrderNode = session.getNodeByName( "StartNewOrder" ); canvas.center(startNewOrderNode.getUUID()); Actual result The view is not centered. Expected result The view is centered. The node should be in the middle of the diagram.
    • ---
    • ---

      Center function from Canvas API doesn't work when the whole node is visible.

      Notes

      The view is centered only in case the node being centered to is only visible partially or not visible at all.

            eignatow Eder Ignatowicz
            lterifaj@redhat.com Lubomir Terifaj
            Daniel Rosa Daniel Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: