Search in sources :

Example 6 with LienzoPanel

use of org.kie.workbench.common.stunner.client.lienzo.canvas.LienzoPanel in project kie-wb-common by kiegroup.

the class ZoomLevelSelectorPresenter method onPanelResize.

private ZoomLevelSelectorPresenter onPanelResize(final double width, final double height) {
    final LienzoPanel panel = getPanel();
    final int absoluteLeft = panel.getView().getAbsoluteLeft();
    final int absoluteTop = panel.getView().getAbsoluteTop();
    final double x = absoluteLeft + width - 174;
    final double y = absoluteTop + height - 50;
    return at(x, y);
}
Also used : LienzoPanel(org.kie.workbench.common.stunner.client.lienzo.canvas.LienzoPanel)

Aggregations

LienzoPanel (org.kie.workbench.common.stunner.client.lienzo.canvas.LienzoPanel)6 Layer (com.ait.lienzo.client.core.shape.Layer)1 ScrollablePanel (com.ait.lienzo.client.widget.panel.scrollbars.ScrollablePanel)1 PanelTransformUtils (com.ait.lienzo.client.widget.panel.util.PanelTransformUtils)1 PanelTransformUtils.computeLevel (com.ait.lienzo.client.widget.panel.util.PanelTransformUtils.computeLevel)1 PanelTransformUtils.computeZoomLevelFitToWidth (com.ait.lienzo.client.widget.panel.util.PanelTransformUtils.computeZoomLevelFitToWidth)1 PanelTransformUtils.setScaleLevel (com.ait.lienzo.client.widget.panel.util.PanelTransformUtils.setScaleLevel)1 MouseOverEvent (com.google.gwt.event.dom.client.MouseOverEvent)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 Timer (com.google.gwt.user.client.Timer)1 IsWidget (com.google.gwt.user.client.ui.IsWidget)1 Supplier (java.util.function.Supplier)1 PostConstruct (javax.annotation.PostConstruct)1 PreDestroy (javax.annotation.PreDestroy)1 Dependent (javax.enterprise.context.Dependent)1 Inject (javax.inject.Inject)1 LienzoCanvas (org.kie.workbench.common.stunner.client.lienzo.canvas.LienzoCanvas)1 LienzoCanvasView (org.kie.workbench.common.stunner.client.lienzo.canvas.LienzoCanvasView)1 LienzoPanelFocusHandler (org.kie.workbench.common.stunner.client.lienzo.components.views.LienzoPanelFocusHandler)1 CanvasPanel (org.kie.workbench.common.stunner.core.client.canvas.CanvasPanel)1