This tutorial describes how to use the geotoolkit/welllog/multiwell/MultiWellWidget with marker editing. It displays three well tracks with the tops and correlation panels added in between tracks. The wells are displayed with different depth scales and offsets. Please refer to Multi Well Correlation tutorial for more details.
# Standard Marker Editor
This example displays how to update correlation marker with standard log visuals editing tool. A top is an instance of geotoolkit/welllog/LogMarker added to the marker layer of the well. In addition, there are correlation panels that are added in between tracks. A correlation panel is an instance of geotoolkit/welllog/multiwell/correlation/CorrelationMarker. Visuals Editor tool allows editing depths of existing tops.
The tool works in both live editing and ghost mode, allows styling of handles, and fires all the events required for full control over user actions. The code below shows how to change depth of correlation marker.
import { TopsEditing } from "/src/code/WellLog/MultiWell/TopsEditing/topsEditingCommon.ts";
function createScene(canvas) {
const tops = new TopsEditing();
const simpleWidget = tops.createWidget();
const plot = tops.addTools(simpleWidget, canvas, false);
return { plot };
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Customization
This example shows how to customize the VisualsEditor tool and how to add or remove tops. A tooltiptool is attached to the cursor, which displays the depth of the top when dragging the marker in ghost mode.
The code below displays how to update the value of tooltiptool when dragging the top editor in ghost mode, how to add tops in well and how to remove tops from well. To update the tooltiptool while dragging, the depth value of the current position of the cursor is used by implementing the addListener method.
import { Selector } from "@int/geotoolkit/selection/Selector.ts";
import { TopsEditing } from "/src/code/WellLog/MultiWell/TopsEditing/topsEditingCommon.ts";
import { WellTrack } from "@int/geotoolkit/welllog/multiwell/WellTrack.ts";
let customWidget = null;
let tops = null;
const dataLayerCallback = (eventArgs) => {
const point = eventArgs.getPlotPoint();
const nodes = Selector.select(eventArgs.getNode(), point.getX(), point.getY(), 0);
let well = null;
for (let i = 0; i < nodes.length; ++i) {
const node = nodes[i];
if (node instanceof WellTrack) {
well = node;
}
}
const markerTool = customWidget.getToolByName("markereditor");
if (well != null && customWidget.getSelectedTrack() === well) {
if (tops.getListOfTracks().indexOf(well) >= 0) {
return null;
}
return markerTool.getDataLayer();
}
let dataLayer;
if (well == null) {
dataLayer = null;
} else {
dataLayer = well.getMarkerLayer();
}
customWidget.setSelectedTrack(well);
return dataLayer;
};
function createScene(canvas) {
tops = new TopsEditing();
customWidget = tops.createWidget();
return { plot: tops.addTools(customWidget, canvas, true), tops };
}
function setToolsEnabled(enabled) {
customWidget.getToolByName("multiwell-splitter").setEnabled(enabled);
customWidget.getToolByName("header-tools").setEnabled(enabled);
customWidget.getToolByName("horizontal-splitter").setEnabled(enabled);
customWidget.getToolByName("well-tools").setEnabled(enabled);
customWidget.getToolByName("TrackPanning").setEnabled(enabled);
}
export { createScene, dataLayerCallback, setToolsEnabled };
createScene(document.querySelector('[ref="plot"]'));