Commit 5c56edf1 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Components: JavaFX editor. Fixed sub-component port location.

Issue-Ref: 3815
Issue-Url: https://af3-developer.fortiss.org/issues/3815

Signed-off-by: Florian Hölzl's avatarFlorian Hoelzl <hoelzl@fortiss.org>
parent 7f398edb
ChannelVisual.java 1d2f0f0b5be74ed9225dc4cadc5d0d6b542d3299 YELLOW
DiagramComponentPortVisual.java 4a2e4f089bf55d8642d0f334a6978cc2bf8bf954 YELLOW
SubComponentPortVisual.java 49e95e5c2190e876965c25095a6b17f2c81614d0 YELLOW
SubComponentVisual.java c8a580b3429f32c94b20cfd987ae182c51e01ba9 YELLOW
SubComponentPortVisual.java 02acdb8ebc050148cbf123e0ab593ac5b076113b YELLOW
SubComponentVisual.java 84f6549016ae4a0e8b430918bc00c682645c7724 YELLOW
......@@ -94,7 +94,12 @@ public final class SubComponentPortVisual extends CircularContentAnchorageVisual
/** {@inheritDoc} */
@Override
public double getOffset() {
return getConnectorOffset(getPort()).getOffset();
EOrientation eo = getConnectorOrientation(getPort());
double dy = 0;
if(eo == EOrientation.WEST || eo == EOrientation.EAST) {
dy = PORT_DIMENSION.getHeight() / 2;
}
return getConnectorOffset(getPort()).getOffset() - dy;
}
/** {@inheritDoc} */
......
......@@ -24,9 +24,7 @@ import static org.fortiss.af3.component.ui.DefaultStyle.WEAKLY_CAUSAL_COMPONENT_
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_CONNECTOR_SIZE;
import static org.fortiss.tooling.base.utils.LayoutDataUtils.getNodeBounds;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramCoordinate;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IContentAnchorageVisual;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IContentVisual;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.rectangular.RectangularContentVisualBase;
import org.fortiss.af3.component.model.Component;
......@@ -87,13 +85,6 @@ public final class SubComponentVisual extends RectangularContentVisualBase {
return getComponent().getName();
}
/** {@inheritDoc} */
@Override
public DiagramCoordinate getAnchorageLocation(IContentAnchorageVisual visual) {
DiagramCoordinate dc = super.getAnchorageLocation(visual);
return dc.add(0, -DEFAULT_CONNECTOR_SIZE / 2);
}
/** {@inheritDoc} */
@Override
public Rectangle2D getModelBounds() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment