geokernel-electron 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/bin/linux-x64/libGeoKernel.Viewer.so +0 -0
- package/bin/win32-x64/GeoKernel.Core.dll +0 -0
- package/bin/win32-x64/GeoKernel.Formats.dll +0 -0
- package/bin/win32-x64/GeoKernel.Viewer.dll +0 -0
- package/package.json +1 -1
- package/src/native-signatures.js +2 -0
- package/src/viewer.js +13 -0
package/README.md
CHANGED
|
@@ -53,6 +53,8 @@ viewer.addControlPanel({
|
|
|
53
53
|
}, (_id, _number, text) => console.log(text));
|
|
54
54
|
viewer.setControlOptions(1, ["Route 1", "Route 2"]);
|
|
55
55
|
viewer.setControlEnabled(1, true);
|
|
56
|
+
viewer.setCommandEnabled(10, false);
|
|
57
|
+
viewer.addTextShape(28.97, 41.01, "1", { textColor: "#FFFFFF", bold: true });
|
|
56
58
|
|
|
57
59
|
const native = createNativeLibrary();
|
|
58
60
|
console.log(native.getFunction("GeoKernelViewer_GetLayerCount"));
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/native-signatures.js
CHANGED
|
@@ -45,6 +45,7 @@ const SIGNATURES = Object.freeze({
|
|
|
45
45
|
"GeoKernelViewer_AddPolylineToEditLayer": ["bool", ["void_p", "int", "double_p", "int"]],
|
|
46
46
|
"GeoKernelViewer_AddPolylineToEditLayerWithAttributes": ["bool", ["void_p", "int", "double_p", "int", "wchar_p"]],
|
|
47
47
|
"GeoKernelViewer_AddShortestRouteLayerBetweenPoints": ["bool", ["void_p", "double", "double", "double", "double", "int", "double", "double", "wchar_p", "bool", "out_route_summary_p"]],
|
|
48
|
+
"GeoKernelViewer_AddTextShape": ["bool", ["void_p", "double", "double", "wchar_p", "wchar_p"]],
|
|
48
49
|
"GeoKernelViewer_AddTopFeatureToSelectionAt": ["bool", ["void_p", "double", "double", "int"]],
|
|
49
50
|
"GeoKernelViewer_AddWfsLayer": ["int", ["void_p", "wchar_p", "wchar_p", "wchar_p", "wchar_p", "wchar_p", "wchar_p", "int"]],
|
|
50
51
|
"GeoKernelViewer_AddWktShape": ["bool", ["void_p", "wchar_p"]],
|
|
@@ -299,6 +300,7 @@ const SIGNATURES = Object.freeze({
|
|
|
299
300
|
"GeoKernelWindow_SetCentralText": ["bool", ["void_p", "wchar_p"]],
|
|
300
301
|
"GeoKernelWindow_SetCentralTextPanel": ["bool", ["void_p", "wchar_p"]],
|
|
301
302
|
"GeoKernelWindow_SetCentralViewer": ["void_p", ["void_p"]],
|
|
303
|
+
"GeoKernelWindow_SetCommandEnabled": ["bool", ["void_p", "int", "bool"]],
|
|
302
304
|
"GeoKernelWindow_SetControlEnabled": ["bool", ["void_p", "int", "bool"]],
|
|
303
305
|
"GeoKernelWindow_SetControlOptionsJson": ["bool", ["void_p", "int", "wchar_p"]],
|
|
304
306
|
"GeoKernelWindow_SetControlValue": ["bool", ["void_p", "int", "double", "wchar_p"]],
|
package/src/viewer.js
CHANGED
|
@@ -229,6 +229,12 @@ class ViewerWindow {
|
|
|
229
229
|
if (!ok) throw new Error("GeoKernelWindow_AddCommandToolbar failed.");
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
setCommandEnabled(commandId, enabled) {
|
|
233
|
+
return this.library.function("GeoKernelWindow_SetCommandEnabled")(
|
|
234
|
+
this.windowHandle, Number(commandId), Boolean(enabled),
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
232
238
|
addControlPanel(configuration, onChange) {
|
|
233
239
|
const callback = koffi.register(
|
|
234
240
|
(controlId, numericValue, textValue) => onChange(controlId, numericValue, textValue ?? ""),
|
|
@@ -1281,6 +1287,13 @@ class ViewerWindow {
|
|
|
1281
1287
|
return this._call("GeoKernelViewer_AddPointShape", Number(x), Number(y), jsonText(style));
|
|
1282
1288
|
}
|
|
1283
1289
|
|
|
1290
|
+
addTextShape(x, y, text, style = {}) {
|
|
1291
|
+
return this._call(
|
|
1292
|
+
"GeoKernelViewer_AddTextShape",
|
|
1293
|
+
Number(x), Number(y), String(text), jsonText(style),
|
|
1294
|
+
);
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1284
1297
|
addPointBufferShape(x, y, distance, pointsPerQuadrant = 16, style = {}) {
|
|
1285
1298
|
return this._call(
|
|
1286
1299
|
"GeoKernelViewer_AddPointBufferShape",
|