Examples of snap()


Examples of com.mxgraph.view.mxGraph.snap()

          if (graphComponent.isGridEnabledEvent(e))
          {
            mxGraph graph = graphComponent.getGraph();

            dx = graph.snap(dx);
            dy = graph.snap(dy);
          }

          boolean clone = isCloneEnabled()
              && graphComponent.isCloneEvent(e);
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

          if (graphComponent.isGridEnabledEvent(e))
          {
            mxGraph graph = graphComponent.getGraph();

            dx = graph.snap(dx);
            dy = graph.snap(dy);
          }

          boolean clone = isCloneEnabled()
              && graphComponent.isCloneEvent(e);
          movePreview.update(e, dx, dy, clone);
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

      double dxg = ((cellBounds.getX() + dx) / scale) - trans.getX();
      double dyg = ((cellBounds.getY() + dy) / scale) - trans.getY();

      if (gridEnabled)
      {
        dxg = graph.snap(dxg);
        dyg = graph.snap(dyg);
      }

      x = (int) Math.round((dxg + trans.getX()) * scale)
          + (int) Math.round(bbox.getX())
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

      double dyg = ((cellBounds.getY() + dy) / scale) - trans.getY();

      if (gridEnabled)
      {
        dxg = graph.snap(dxg);
        dyg = graph.snap(dyg);
      }

      x = (int) Math.round((dxg + trans.getX()) * scale)
          + (int) Math.round(bbox.getX())
          - (int) Math.round(cellBounds.getX());
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

          double dyg = ((cellBounds.getY() + dy) / scale)
              - trans.getY();

          if (gridEnabledEvent)
          {
            dxg = graph.snap(dxg);
            dyg = graph.snap(dyg);
          }

          double x = ((dxg + trans.getX()) * scale) + (bbox.getX())
              - (cellBounds.getX());
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

              - trans.getY();

          if (gridEnabledEvent)
          {
            dxg = graph.snap(dxg);
            dyg = graph.snap(dyg);
          }

          double x = ((dxg + trans.getX()) * scale) + (bbox.getX())
              - (cellBounds.getX());
          double y = ((dyg + trans.getY()) * scale) + (bbox.getY())
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

        Rectangle rect = bounds.getRectangle();

        // Snaps new bounds to grid (unscaled)
        if (gridEnabledEvent)
        {
          int x = (int) graph.snap(rect.x);
          int y = (int) graph.snap(rect.y);
          rect.width = (int) graph.snap(rect.width - x + rect.x);
          rect.height = (int) graph.snap(rect.height - y + rect.y);
          rect.x = x;
          rect.y = y;
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

        // Snaps new bounds to grid (unscaled)
        if (gridEnabledEvent)
        {
          int x = (int) graph.snap(rect.x);
          int y = (int) graph.snap(rect.y);
          rect.width = (int) graph.snap(rect.width - x + rect.x);
          rect.height = (int) graph.snap(rect.height - y + rect.y);
          rect.x = x;
          rect.y = y;
        }
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

        // Snaps new bounds to grid (unscaled)
        if (gridEnabledEvent)
        {
          int x = (int) graph.snap(rect.x);
          int y = (int) graph.snap(rect.y);
          rect.width = (int) graph.snap(rect.width - x + rect.x);
          rect.height = (int) graph.snap(rect.height - y + rect.y);
          rect.x = x;
          rect.y = y;
        }
View Full Code Here

Examples of com.mxgraph.view.mxGraph.snap()

        if (gridEnabledEvent)
        {
          int x = (int) graph.snap(rect.x);
          int y = (int) graph.snap(rect.y);
          rect.width = (int) graph.snap(rect.width - x + rect.x);
          rect.height = (int) graph.snap(rect.height - y + rect.y);
          rect.x = x;
          rect.y = y;
        }

        graph.resizeCell(cell, new mxRectangle(rect));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.