@pirireis/webglobeplugins 0.12.0-alpha → 0.14.0-alpha
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/Math/arc-cdf-points.js +20 -0
- package/Math/arc-generate-points copy.js +1 -0
- package/Math/arc.js +21 -8
- package/Math/circle-cdf-points.js +0 -2
- package/Math/circle.js +35 -16
- package/Math/templete-shapes/grid-visually-equal.js +66 -0
- package/altitude-locator/plugin.js +3 -2
- package/bearing-line/plugin.js +1 -2
- package/circle-line-chain/plugin.js +4 -7
- package/compass-rose/compass-rose-padding-flat.js +12 -0
- package/package.json +1 -1
- package/programs/line-on-globe/degree-padding-around-circle-3d.js +1 -1
- package/programs/line-on-globe/linestrip/data.js +4 -0
- package/programs/line-on-globe/{linestrip.js → linestrip/linestrip.js} +37 -35
- package/programs/line-on-globe/naive-accurate-flexible.js +23 -16
- package/programs/picking/pickable-renderer.js +1 -2
- package/programs/rings/distancering/circleflatprogram.js +116 -120
- package/programs/rings/distancering/circlepaddingfreeangleprogram.js +1 -1
- package/programs/rings/distancering/circlepaddysharedbuffer.js +368 -354
- package/programs/rings/distancering/index.js +6 -5
- package/programs/rings/distancering/paddyflatprogram.js +127 -136
- package/programs/rings/distancering/paddyflatprogram2d.js +129 -138
- package/programs/rings/distancering/paddyflatprogram3d.js +128 -136
- package/programs/rings/partial-ring/piece-of-pie copy.js +286 -0
- package/programs/rings/partial-ring/piece-of-pie.js +26 -13
- package/programs/totems/camerauniformblock.js +1 -1
- package/programs/totems/index.js +1 -1
- package/programs/vectorfields/logics/pixelbased.js +5 -21
- package/range-tools-on-terrain/bearing-line/adapters.js +111 -0
- package/range-tools-on-terrain/bearing-line/plugin.js +360 -0
- package/range-tools-on-terrain/bearing-line/types.js +1 -0
- package/range-tools-on-terrain/circle-line-chain/adapters.js +83 -0
- package/range-tools-on-terrain/circle-line-chain/chain-list-map.js +351 -0
- package/range-tools-on-terrain/circle-line-chain/plugin.js +389 -0
- package/range-tools-on-terrain/circle-line-chain/types.js +1 -0
- package/range-tools-on-terrain/range-ring/adapters.js +25 -0
- package/range-tools-on-terrain/range-ring/plugin.js +31 -0
- package/range-tools-on-terrain/range-ring/types.js +1 -0
- package/rangerings/plugin.js +7 -11
- package/semiplugins/lightweight/line-plugin.js +195 -0
- package/semiplugins/lightweight/piece-of-pie-plugin.js +175 -0
- package/semiplugins/shape-on-terrain/arc-plugin.js +368 -0
- package/{shape-on-terrain/circle/plugin.js → semiplugins/shape-on-terrain/circle-plugin.js} +129 -68
- package/semiplugins/shape-on-terrain/derived/padding-plugin.js +96 -0
- package/semiplugins/type.js +1 -0
- package/types.js +0 -11
- package/util/account/create-buffermap-orchastration.js +39 -0
- package/util/account/index.js +2 -2
- package/util/account/single-attribute-buffer-management/buffer-manager.js +2 -3
- package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +14 -3
- package/util/build-strategy/static-dynamic.js +1 -1
- package/util/check/typecheck.js +15 -1
- package/util/geometry/index.js +3 -2
- package/util/gl-util/buffer/attribute-loader.js +2 -5
- package/util/gl-util/draw-options/methods.js +4 -5
- package/util/webglobjectbuilders.js +4 -9
- package/write-text/context-text3.js +17 -0
- package/write-text/context-text3old.js +152 -0
- package/programs/line-on-globe/circle-accurate.js +0 -175
- package/programs/line-on-globe/circle.js +0 -164
- package/programs/line-on-globe/to-the-surface.js +0 -109
- package/programs/rings/distancering/shader.js +0 -1
- package/programs/totems/canvas-webglobe-info1.js +0 -106
- package/shape-on-terrain/arc/naive/plugin.js +0 -205
- package/util/check/get.js +0 -14
- package/util/gl-util/buffer/types.js +0 -1
- package/util/gl-util/draw-options/types.js +0 -15
- package/util/webglobjectbuilders1.js +0 -219
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export const keyMethod = (chainKey, nodeKey) => `${chainKey}_${nodeKey}`;
|
|
2
|
+
const distance = (node1, node2) => {
|
|
3
|
+
const dx = node1.long - node2.long;
|
|
4
|
+
const dy = node1.lat - node2.lat;
|
|
5
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
6
|
+
};
|
|
7
|
+
export const circleDataAdaptor = (globe, chain) => {
|
|
8
|
+
const circleInputs = [];
|
|
9
|
+
const { chainKey, chainProperties, nodes } = chain;
|
|
10
|
+
for (let i = 0; i < nodes.length - 1; i++) {
|
|
11
|
+
const node = nodes[i];
|
|
12
|
+
const { key, long, lat, circleProperties } = node;
|
|
13
|
+
const color = circleProperties?.rgba ?? chainProperties.rgba ?? [1, 1, 1, 1]; // Default color if not specified
|
|
14
|
+
if (key === "Sakarya") {
|
|
15
|
+
console.log("circleProperties", circleProperties, "chainProperties", chainProperties);
|
|
16
|
+
console.log("Sakarya color", color);
|
|
17
|
+
}
|
|
18
|
+
const radius = globe.Math.GetDist2D(long, lat, nodes[i + 1].long, nodes[i + 1].lat);
|
|
19
|
+
const nodeKey = keyMethod(chainKey, key);
|
|
20
|
+
circleInputs.push({
|
|
21
|
+
key: nodeKey,
|
|
22
|
+
center: [long, lat],
|
|
23
|
+
radius,
|
|
24
|
+
height: chainProperties.altitude ?? 0,
|
|
25
|
+
color: color,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return circleInputs;
|
|
29
|
+
};
|
|
30
|
+
export function arcDataAdaptor(chain) {
|
|
31
|
+
const arcInputs = [];
|
|
32
|
+
const { chainKey, chainProperties, nodes } = chain;
|
|
33
|
+
for (let i = 0; i < nodes.length - 1; i++) {
|
|
34
|
+
const node = nodes[i];
|
|
35
|
+
const nextNode = nodes[i + 1];
|
|
36
|
+
const { key, long, lat, lineProperties } = node;
|
|
37
|
+
const nodeKey = keyMethod(chainKey, key);
|
|
38
|
+
const { long: nextLong, lat: nextLat } = nextNode;
|
|
39
|
+
const color = lineProperties?.rgba ?? chainProperties.rgba ?? [1, 1, 1, 1]; // Default color if not specified
|
|
40
|
+
arcInputs.push({
|
|
41
|
+
key: nodeKey,
|
|
42
|
+
start: [long, lat],
|
|
43
|
+
end: [nextLong, nextLat],
|
|
44
|
+
height: chainProperties.altitude ?? 0,
|
|
45
|
+
color: color,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return arcInputs;
|
|
49
|
+
}
|
|
50
|
+
export function lineDataAdaptor(chain) {
|
|
51
|
+
const lineInputs = [];
|
|
52
|
+
const { chainKey, chainProperties, nodes } = chain;
|
|
53
|
+
for (let i = 0; i < nodes.length - 1; i++) {
|
|
54
|
+
const node = nodes[i];
|
|
55
|
+
const nextNode = nodes[i + 1];
|
|
56
|
+
const { key, long, lat, lineProperties } = node;
|
|
57
|
+
const nodeKey = keyMethod(chainKey, key);
|
|
58
|
+
const { long: nextLong, lat: nextLat } = nextNode;
|
|
59
|
+
const color = lineProperties?.rgba ?? chainProperties.rgba ?? [1, 1, 1, 1]; // Default color if not specified
|
|
60
|
+
lineInputs.push({
|
|
61
|
+
key: nodeKey,
|
|
62
|
+
start: [long, lat],
|
|
63
|
+
end: [nextLong, nextLat],
|
|
64
|
+
start_altitude: chainProperties.altitude ?? 0,
|
|
65
|
+
end_altitude: chainProperties.altitude ?? 0,
|
|
66
|
+
color: color,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return lineInputs;
|
|
70
|
+
}
|
|
71
|
+
export function getOpacity(opacities, key) {
|
|
72
|
+
return opacities[key] ?? opacities.general ?? 1;
|
|
73
|
+
}
|
|
74
|
+
export function nodeKeysFromChain(chainKey, nodes) {
|
|
75
|
+
return nodes.map((node) => keyMethod(chainKey, node.key));
|
|
76
|
+
}
|
|
77
|
+
export function clipANodeReturnIndex(nodes, nodeKey) {
|
|
78
|
+
const index = nodes.findIndex(node => node.key === nodeKey);
|
|
79
|
+
if (index === -1) {
|
|
80
|
+
throw new Error(`Node with key ${nodeKey} not found in the chain.`);
|
|
81
|
+
}
|
|
82
|
+
nodes.splice(index, 1); // Remove the node from the array
|
|
83
|
+
}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* set and get node data
|
|
3
|
+
* node indexes;
|
|
4
|
+
*/
|
|
5
|
+
export class ChainListMap {
|
|
6
|
+
_chainMap;
|
|
7
|
+
_chainSideProperties;
|
|
8
|
+
_indexMap; // hold list index of lastly updated nodes. on add delete goes empty
|
|
9
|
+
keyMethod;
|
|
10
|
+
constructor(keyMethod) {
|
|
11
|
+
this._chainMap = new Map();
|
|
12
|
+
this._chainSideProperties = new Map();
|
|
13
|
+
this._indexMap = new Map();
|
|
14
|
+
this.keyMethod = keyMethod;
|
|
15
|
+
}
|
|
16
|
+
hasChain(chainKey) {
|
|
17
|
+
return this._chainMap.has(chainKey);
|
|
18
|
+
}
|
|
19
|
+
getNodes(chainKey) {
|
|
20
|
+
return this._chainMap.get(chainKey);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @param node
|
|
25
|
+
* @param chainKey
|
|
26
|
+
* @param theNodeKeyFront
|
|
27
|
+
*/
|
|
28
|
+
addNode(node, chainKey, theNodeKeyFront = null) {
|
|
29
|
+
const chain = this.getNodes(chainKey);
|
|
30
|
+
if (!chain)
|
|
31
|
+
return;
|
|
32
|
+
let frontIndex = null;
|
|
33
|
+
for (let i = 0; i < chain.length; i++) {
|
|
34
|
+
const n_ode = chain[i];
|
|
35
|
+
if (n_ode.key === node.key) {
|
|
36
|
+
throw new Error("Chain node already exists");
|
|
37
|
+
}
|
|
38
|
+
if (n_ode.key === theNodeKeyFront) {
|
|
39
|
+
frontIndex = i;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (theNodeKeyFront !== null) {
|
|
43
|
+
if (frontIndex !== null) {
|
|
44
|
+
chain.splice(frontIndex, 0, node);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw new Error("Could not find theNodeKeyFront");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
chain.push(node);
|
|
52
|
+
}
|
|
53
|
+
node.__identity__ = this.keyMethod(chainKey, node.key);
|
|
54
|
+
this._resetIndexChain(chainKey);
|
|
55
|
+
}
|
|
56
|
+
deleteNodesBelongToAChain(chainKey, nodeKeys) {
|
|
57
|
+
const chain = this._chainMap.get(chainKey);
|
|
58
|
+
if (!chain)
|
|
59
|
+
return [];
|
|
60
|
+
const deleteKeys = [];
|
|
61
|
+
const removeSet = new Set(nodeKeys);
|
|
62
|
+
const newChain = [];
|
|
63
|
+
for (let i = 0; i < chain.length - 1; i++) {
|
|
64
|
+
const node = chain[i];
|
|
65
|
+
const dKey = node.__identity__;
|
|
66
|
+
this._indexMap.delete(dKey);
|
|
67
|
+
if (removeSet.has(node.key)) {
|
|
68
|
+
deleteKeys.push(dKey);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
newChain.push(node);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
{ // last item case
|
|
75
|
+
const lastItem = chain[chain.length - 1];
|
|
76
|
+
this._indexMap.delete(lastItem.__identity__);
|
|
77
|
+
if (removeSet.has(lastItem.key)) {
|
|
78
|
+
if (chain.length > 1) {
|
|
79
|
+
deleteKeys.push(chain[chain.length - 2].__identity__);
|
|
80
|
+
deleteKeys.push(chain[chain.length - 1].__identity__);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
newChain.push(lastItem);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
this._chainMap.set(chainKey, newChain);
|
|
88
|
+
return deleteKeys;
|
|
89
|
+
}
|
|
90
|
+
deleteChainAndReturnChainKeys(chainKey) {
|
|
91
|
+
const keys = this.getNodeKeysOfChain(chainKey);
|
|
92
|
+
this._chainMap.delete(chainKey);
|
|
93
|
+
this._chainSideProperties.delete(chainKey); // TODO: this might be this way but adding this know can cause side effects
|
|
94
|
+
for (const key of keys)
|
|
95
|
+
this._indexMap.delete(key);
|
|
96
|
+
return keys;
|
|
97
|
+
}
|
|
98
|
+
updateNode(node, chainKey) {
|
|
99
|
+
const index = this.getIndexOfNode(chainKey, node.key);
|
|
100
|
+
if (index === undefined)
|
|
101
|
+
return;
|
|
102
|
+
const chain = this._chainMap.get(chainKey);
|
|
103
|
+
if (!chain)
|
|
104
|
+
return;
|
|
105
|
+
node.__identity__ = this.keyMethod(chainKey, node.key);
|
|
106
|
+
chain[index] = node;
|
|
107
|
+
}
|
|
108
|
+
updateNodesProperties(chainKey, nodes) {
|
|
109
|
+
nodes.forEach((node) => {
|
|
110
|
+
const index = this.getIndexOfNode(chainKey, node.key);
|
|
111
|
+
if (index === undefined)
|
|
112
|
+
return;
|
|
113
|
+
const chain = this._chainMap.get(chainKey);
|
|
114
|
+
if (!chain)
|
|
115
|
+
return;
|
|
116
|
+
const chainNode = chain[index];
|
|
117
|
+
if (node.circleProperties) {
|
|
118
|
+
if (typeof chainNode.circleProperties !== 'object')
|
|
119
|
+
chainNode.circleProperties = {};
|
|
120
|
+
Object.entries(node.circleProperties).forEach(([key, value]) => {
|
|
121
|
+
chainNode.circleProperties[key] = value;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (node.lineProperties) {
|
|
125
|
+
if (typeof chainNode.lineProperties !== 'object')
|
|
126
|
+
chainNode.lineProperties = {};
|
|
127
|
+
Object.entries(node.lineProperties).forEach(([key, value]) => {
|
|
128
|
+
chainNode.lineProperties[key] = value;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
updateCoordsinatesOfNode(node, chainKey) {
|
|
134
|
+
const index = this.getIndexOfNode(chainKey, node.key);
|
|
135
|
+
if (index === undefined)
|
|
136
|
+
return;
|
|
137
|
+
const chain = this._chainMap.get(chainKey);
|
|
138
|
+
if (!chain)
|
|
139
|
+
return;
|
|
140
|
+
chain[index].long = node.long;
|
|
141
|
+
chain[index].lat = node.lat;
|
|
142
|
+
}
|
|
143
|
+
setChain(chainKey, nodeList) {
|
|
144
|
+
if (this._chainMap.has(chainKey))
|
|
145
|
+
this._flushIndexMap();
|
|
146
|
+
this._chainMap.set(chainKey, nodeList);
|
|
147
|
+
nodeList.forEach((v) => v.__identity__ = this.keyMethod(chainKey, v.key));
|
|
148
|
+
}
|
|
149
|
+
setChainProperties(chainKey, properties) {
|
|
150
|
+
this._chainSideProperties.set(chainKey, properties);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
*
|
|
154
|
+
* @param chainKey
|
|
155
|
+
* @param properties
|
|
156
|
+
* // after this method update text and buffer data of the chain
|
|
157
|
+
*/
|
|
158
|
+
updateChainProperties(chainKey, properties) {
|
|
159
|
+
const memoryProperties = this._chainSideProperties.get(chainKey);
|
|
160
|
+
if (!memoryProperties)
|
|
161
|
+
return;
|
|
162
|
+
properties.forEach((value, key) => {
|
|
163
|
+
memoryProperties[key] = value;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
// TODO: bad name clean up, need to check on frontend
|
|
167
|
+
getNodeProperties(chainKey) {
|
|
168
|
+
return this._chainSideProperties.get(chainKey);
|
|
169
|
+
}
|
|
170
|
+
getChainProperties(chainKey) {
|
|
171
|
+
return this._chainSideProperties.get(chainKey);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
* @param chainKey
|
|
176
|
+
* @param callback | (value, index, array) => expected output
|
|
177
|
+
*/
|
|
178
|
+
calculateBufferPropertiesChain(chainKey, callback, result) {
|
|
179
|
+
const chain = this._chainMap.get(chainKey);
|
|
180
|
+
if (!chain)
|
|
181
|
+
return;
|
|
182
|
+
const props = this._chainSideProperties.get(chainKey);
|
|
183
|
+
if (!props)
|
|
184
|
+
return;
|
|
185
|
+
for (let i = 0; i < chain.length - 1; i++) {
|
|
186
|
+
const node = callback(chain[i], i, chain, props);
|
|
187
|
+
if (node !== null)
|
|
188
|
+
result.push(node);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @param chainKey
|
|
193
|
+
* @param textWriterObjs
|
|
194
|
+
* @param dataPreAdaptor use nodeKeys on updateCoordinatesOnly
|
|
195
|
+
*/
|
|
196
|
+
textUpdate(chainKey, textWriterObjs, dataPreAdaptor) {
|
|
197
|
+
const chain = this._chainMap.get(chainKey);
|
|
198
|
+
if (!chain)
|
|
199
|
+
return;
|
|
200
|
+
const data = (dataPreAdaptor) ? chain.map(dataPreAdaptor) : chain;
|
|
201
|
+
const properties = this._chainSideProperties.get(chainKey);
|
|
202
|
+
if (!properties)
|
|
203
|
+
return;
|
|
204
|
+
textWriterObjs.forEach((writer) => {
|
|
205
|
+
writer.insertTextBulk(data, properties);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
getAllChainKeysIterator() {
|
|
209
|
+
return this._chainMap.keys();
|
|
210
|
+
}
|
|
211
|
+
getIndexOfNode(chainKey, nodeKey) {
|
|
212
|
+
const key = this.keyMethod(chainKey, nodeKey);
|
|
213
|
+
if (this._indexMap.has(key))
|
|
214
|
+
return this._indexMap.get(key);
|
|
215
|
+
const chain = this._chainMap.get(chainKey);
|
|
216
|
+
if (!chain)
|
|
217
|
+
return undefined;
|
|
218
|
+
for (let i = 0; i < chain.length; i++) {
|
|
219
|
+
const node = chain[i];
|
|
220
|
+
this._indexMap.set(key, i);
|
|
221
|
+
if (node.key === nodeKey) {
|
|
222
|
+
return i;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
_flushIndexMap() {
|
|
228
|
+
this._indexMap.clear();
|
|
229
|
+
}
|
|
230
|
+
_resetIndexChain(chainKey) {
|
|
231
|
+
const chain = this._chainMap.get(chainKey);
|
|
232
|
+
if (!chain)
|
|
233
|
+
return;
|
|
234
|
+
for (let i = 0; i < chain.length; i++) {
|
|
235
|
+
const node = chain[i];
|
|
236
|
+
this._indexMap.set(this.keyMethod(chainKey, node.key), i);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
getNodeKeysOfChain(chainKey) {
|
|
240
|
+
const chain = this._chainMap.get(chainKey);
|
|
241
|
+
if (!chain) {
|
|
242
|
+
console.warn(`Chain with key ${chainKey} not found.`);
|
|
243
|
+
return [];
|
|
244
|
+
}
|
|
245
|
+
;
|
|
246
|
+
const result = chain.map((v) => v.__identity__);
|
|
247
|
+
return result;
|
|
248
|
+
}
|
|
249
|
+
getChain(chainKey, output) {
|
|
250
|
+
const nodes = this.getNodes(chainKey);
|
|
251
|
+
if (!nodes)
|
|
252
|
+
return undefined;
|
|
253
|
+
const chainProperties = this.getChainProperties(chainKey) ?? {};
|
|
254
|
+
// Directly modify the output object
|
|
255
|
+
if (!output) {
|
|
256
|
+
output = {}; // Create a new object if not provided
|
|
257
|
+
}
|
|
258
|
+
output.chainKey = chainKey;
|
|
259
|
+
output.chainProperties = chainProperties;
|
|
260
|
+
output.nodes = nodes;
|
|
261
|
+
return output;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// // #####################################
|
|
265
|
+
// // #####################################
|
|
266
|
+
// this.clcPlugin = new CircleLineChainPlugin('circleLineChain', {
|
|
267
|
+
// textDataPreAdaptor: _this.textWriter.preAdaptor,
|
|
268
|
+
// textWritersMap: new Map([
|
|
269
|
+
// ['distance', this.textWriter.distance],
|
|
270
|
+
// ['totalDistance', this.textWriter.totalDistance],
|
|
271
|
+
// ]),
|
|
272
|
+
// });
|
|
273
|
+
// // #####################################
|
|
274
|
+
// // #####################################
|
|
275
|
+
// _this.clcPlugin.deleteNodes(
|
|
276
|
+
// [
|
|
277
|
+
// {
|
|
278
|
+
// chainKey: chainKey,
|
|
279
|
+
// nodeKeys: [currentNodes[index].key],
|
|
280
|
+
// },
|
|
281
|
+
// ],
|
|
282
|
+
// { textWriterIDs: ['distance', 'totalDistance'] },
|
|
283
|
+
// );
|
|
284
|
+
// // #####################################
|
|
285
|
+
// // #####################################
|
|
286
|
+
// this.clcPlugin.updateText(['distance', 'totalDistance']);
|
|
287
|
+
// // #####################################
|
|
288
|
+
// // #####################################
|
|
289
|
+
// this.clcPlugin.updateNodeCoordinates(
|
|
290
|
+
// {
|
|
291
|
+
// key: key,
|
|
292
|
+
// lat: lat,
|
|
293
|
+
// long: long,
|
|
294
|
+
// },
|
|
295
|
+
// chainKey,
|
|
296
|
+
// { textWriterIDs: ['distance', 'totalDistance'] },
|
|
297
|
+
// );
|
|
298
|
+
// // #####################################
|
|
299
|
+
// // #####################################
|
|
300
|
+
// this.clcPlugin.deleteChains([chainKey]);
|
|
301
|
+
// // #####################################
|
|
302
|
+
// // #####################################
|
|
303
|
+
// for (const key of this.clcPlugin._chainListMap._chainMap.keys()) { }
|
|
304
|
+
// // #####################################
|
|
305
|
+
// // #####################################
|
|
306
|
+
// _this.clcPlugin.insertBulk(
|
|
307
|
+
// [
|
|
308
|
+
// {
|
|
309
|
+
// chainKey: chainKey,
|
|
310
|
+
// nodes: [{ ...currentNode }, { ...nextNode }],
|
|
311
|
+
// chainProperties: {
|
|
312
|
+
// ...pluginOptions,
|
|
313
|
+
// rgba: HelperJS.normalizeRGBA(pluginOptions.rgba),
|
|
314
|
+
// dashOpacity: 1,
|
|
315
|
+
// },
|
|
316
|
+
// },
|
|
317
|
+
// ],
|
|
318
|
+
// {
|
|
319
|
+
// textWriterIDs: ['distance', 'totalDistance'],
|
|
320
|
+
// },
|
|
321
|
+
// );
|
|
322
|
+
// // #####################################
|
|
323
|
+
// // #####################################
|
|
324
|
+
// _this.clcPlugin.addNode(
|
|
325
|
+
// {
|
|
326
|
+
// key: `point-${chainNodes.length + 1}-${uuidv4()}`,
|
|
327
|
+
// lat: currentCoords.lat,
|
|
328
|
+
// long: currentCoords.long,
|
|
329
|
+
// circleProperties: {},
|
|
330
|
+
// },
|
|
331
|
+
// chainKey,
|
|
332
|
+
// {
|
|
333
|
+
// theNodeKeyFront: null,
|
|
334
|
+
// textWriterIDs: ['distance', 'totalDistance'],
|
|
335
|
+
// },
|
|
336
|
+
// );
|
|
337
|
+
// // #####################################
|
|
338
|
+
// // #####################################
|
|
339
|
+
// _this.clcPlugin.updateNodesProperties(chainKey, updateNodes, {
|
|
340
|
+
// textWriterIDs: ['distance', 'totalDistance'],
|
|
341
|
+
// });
|
|
342
|
+
// // #####################################
|
|
343
|
+
// // #####################################
|
|
344
|
+
// this.clcPlugin._chainListMap.getChain(chainKey); // ismi degisti. plugininde benzer metodu var.
|
|
345
|
+
// // #####################################
|
|
346
|
+
// // #####################################
|
|
347
|
+
// this.clcPlugin.setDrawCircleOn(show);
|
|
348
|
+
// // #####################################
|
|
349
|
+
// // #####################################
|
|
350
|
+
// this.clcPlugin.free();
|
|
351
|
+
// // #####################################
|