public void onMouseUp(MouseUpEvent event) {
if (event.getNativeButton() != Event.BUTTON_RIGHT) {
FeatureTransaction featureTransaction = getFeatureTransaction();
if (featureTransaction != null && parent.getEditMode() == EditMode.INSERT_MODE) {
// The creation of a new point:
FeatureOperation op = new AddCoordinateOp(getGeometryIndex(), getWorldPosition(event));
featureTransaction.execute(op);
parent.setEditMode(EditMode.DRAG_MODE);
mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.ALL);
updateGeometricInfo();
} else if (featureTransaction != null && parent.getEditMode() == EditMode.DRAG_MODE
&& dragTargetId != null) {
// Done dragging a point:
TransactionGeomIndex index = TransactionGeomIndexUtil.getIndex(dragTargetId);
// TODO: snap ???
FeatureOperation op = new SetCoordinateOp(index, getWorldPosition(event));
featureTransaction.execute(op);
if (dragTransaction != null) {
mapWidget.render(dragTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
dragTransaction = null;
}