use of com.ait.lienzo.client.core.shape.wires.WiresLayer in project lienzo-core by ahome-it.
the class WiresContainmentControlImpl method calculateCandidateLocation.
public static Point2D calculateCandidateLocation(final WiresParentPickerControlImpl parentPickerControl) {
final WiresLayer layer = parentPickerControl.getShape().getWiresManager().getLayer();
final WiresContainer parent = parentPickerControl.getParent();
final Point2D current = parentPickerControl.getShapeLocation();
if ((parent == null) || (parent == layer)) {
return current;
} else {
final Point2D trgAbsOffset = parent.getComputedLocation();
return current.minus(trgAbsOffset);
}
}
use of com.ait.lienzo.client.core.shape.wires.WiresLayer in project lienzo-core by ahome-it.
the class WiresDockingControlImpl method _isAccept.
private boolean _isAccept() {
final WiresLayer layer = getParentPickerControl().getWiresLayer();
final WiresManager wiresManager = layer.getWiresManager();
final IDockingAcceptor dockingAcceptor = wiresManager.getDockingAcceptor();
return (null != getParent()) && (null != getParentShapePart()) && (getParentShapePart() == PickerPart.ShapePart.BORDER) && dockingAcceptor.acceptDocking(getParent(), getShape());
}
Aggregations