@pirireis/webglobeplugins 0.3.0 → 0.3.1
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/bearing-line/plugin.js +8 -8
- package/package.json +1 -1
package/bearing-line/plugin.js
CHANGED
|
@@ -156,14 +156,13 @@ export default class Plugin {
|
|
|
156
156
|
* @param {Array<{key, long, lat, endLong, endLat, bearingAngle, radius, rgba:[4numbers]}>} items
|
|
157
157
|
*/
|
|
158
158
|
|
|
159
|
-
insertBulk(items) {
|
|
159
|
+
insertBulk(items, injectionsSubSetIDs = []) {
|
|
160
160
|
const { globe, bufferOrchestrator, bufferManagersCompMap } = this;// angleTextContext, distanceTextContext,
|
|
161
|
+
const injectionsSubSet = injectionsSubSetIDs.map((id) => this._textContextInjectionMap.get(id));
|
|
161
162
|
const data = []
|
|
162
163
|
for (let item of items) {
|
|
163
|
-
this._insertTexts(item);
|
|
164
|
+
this._insertTexts(item, injectionsSubSet);
|
|
164
165
|
data.push(this.__insertAdaptor(item));
|
|
165
|
-
|
|
166
|
-
|
|
167
166
|
}
|
|
168
167
|
bufferOrchestrator.insertBulk(data, bufferManagersCompMap);
|
|
169
168
|
globe.DrawRender();
|
|
@@ -189,11 +188,12 @@ export default class Plugin {
|
|
|
189
188
|
*
|
|
190
189
|
* @param {Array<{key, long, lat, endLong, endLat, bearing}>} items // TODO
|
|
191
190
|
*/
|
|
192
|
-
updateCoordinatesBulk(items) { //TODO
|
|
191
|
+
updateCoordinatesBulk(items, injectionSubSetIDs = []) { //TODO
|
|
192
|
+
const injectionsSubSet = injectionSubSetIDs.map((id) => this._textContextInjectionMap.get(id));
|
|
193
193
|
const { globe, bufferOrchestrator, bufferManagersCompMap, angleTextContext, distanceTextContext } = this;
|
|
194
194
|
const data = []
|
|
195
195
|
for (let item of items) {
|
|
196
|
-
this._insertTexts(item);
|
|
196
|
+
this._insertTexts(item, injectionsSubSet);
|
|
197
197
|
data.push(this.__updateCoordsAdaptor(item));
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -284,8 +284,8 @@ export default class Plugin {
|
|
|
284
284
|
|
|
285
285
|
|
|
286
286
|
|
|
287
|
-
_insertTexts(item) {
|
|
288
|
-
|
|
287
|
+
_insertTexts(item, injectionSubSet) {
|
|
288
|
+
injectionSubSet.forEach((v) => {
|
|
289
289
|
const { coordsAdaptor, textAdaptor, writer } = v
|
|
290
290
|
const { lat, long } = coordsAdaptor(item);
|
|
291
291
|
const text = textAdaptor(item);
|