Search in sources :

Example 1 with DMNGridPanel

use of org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel in project kie-wb-common by kiegroup.

the class CellEditorControls method getTransformedX.

private int getTransformedX(final int x) {
    final DMNGridPanel gridPanel = gridPanelSupplier.get().get();
    final Transform transform = gridPanel.getViewport().getTransform();
    return (int) ((x * transform.getScaleX()) + transform.getTranslateX()) + gridPanel.getAbsoluteLeft();
}
Also used : DMNGridPanel(org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel) Transform(com.ait.lienzo.client.core.types.Transform)

Example 2 with DMNGridPanel

use of org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel in project kie-wb-common by kiegroup.

the class CellEditorControls method getTransformedY.

private int getTransformedY(final int y) {
    final DMNGridPanel gridPanel = gridPanelSupplier.get().get();
    final Transform transform = gridPanel.getViewport().getTransform();
    return (int) ((y * transform.getScaleY()) + transform.getTranslateY()) + gridPanel.getAbsoluteTop();
}
Also used : DMNGridPanel(org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel) Transform(com.ait.lienzo.client.core.types.Transform)

Aggregations

Transform (com.ait.lienzo.client.core.types.Transform)2 DMNGridPanel (org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel)2