use of org.kie.workbench.common.stunner.core.client.canvas.CanvasGrid in project kie-wb-common by kiegroup.
the class LienzoGridLayerBuilder method getLienzoGridFor.
public static GridLayer getLienzoGridFor(final CanvasGrid canvasGrid) {
final CanvasGrid.GridLine line1 = canvasGrid.getLine1();
final CanvasGrid.GridLine line2 = canvasGrid.getLine2();
final Line gridLine1 = createLine(line1);
final Line gridLine2 = null != line2 ? createLine(line2) : null;
if (null != gridLine2) {
return new GridLayer(line1.getDistance(), gridLine1, line2.getDistance(), gridLine2);
} else {
return new GridLayer(line1.getDistance(), gridLine1);
}
}
Aggregations