@vesium/plot 1.0.1-beta.38 → 1.0.1-beta.39
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/dist/index.cjs +18 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.iife.js +18 -19
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +18 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.iife.js
CHANGED
|
@@ -338,15 +338,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
338
338
|
};
|
|
339
339
|
function usePositioned(type, listener) {
|
|
340
340
|
const screenEvent = EVENT_TYPE_RECORD[type];
|
|
341
|
-
const
|
|
342
|
-
const pick = useScenePick(position);
|
|
341
|
+
const viewer = useViewer();
|
|
343
342
|
useScreenSpaceEventHandler(screenEvent, (event) => {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}, {
|
|
349
|
-
flush: "post"
|
|
343
|
+
var _a;
|
|
344
|
+
const position = event.position;
|
|
345
|
+
const pick = (_a = viewer.value) == null ? void 0 : _a.scene.pick(position);
|
|
346
|
+
pick && position && listener({ event: { position }, pick });
|
|
350
347
|
});
|
|
351
348
|
}
|
|
352
349
|
const GLOBAL_GRAPHIC_SYMBOL = Symbol("GLOBAL_GRAPHIC_SYMBOL");
|
|
@@ -1229,7 +1226,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1229
1226
|
}
|
|
1230
1227
|
return ((_a = activeEntity.value) == null ? void 0 : _a.id) === entity.id ? PlotAction.ACTIVE : ((_b = hoverEntity.value) == null ? void 0 : _b.id) === entity.id ? PlotAction.HOVER : PlotAction.IDLE;
|
|
1231
1228
|
};
|
|
1232
|
-
const update =
|
|
1229
|
+
const update = (plot, destroyed) => {
|
|
1233
1230
|
const oldEntities = plot.skeletons;
|
|
1234
1231
|
const entities = [];
|
|
1235
1232
|
if (destroyed || plot.disabled) {
|
|
@@ -1276,7 +1273,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1276
1273
|
});
|
|
1277
1274
|
}
|
|
1278
1275
|
plot.skeletons = entities;
|
|
1279
|
-
}
|
|
1276
|
+
};
|
|
1280
1277
|
const { addGraphicEvent } = useGraphicEvent();
|
|
1281
1278
|
vue.watchEffect((onCleanup) => {
|
|
1282
1279
|
const remove = addGraphicEvent("global", "DRAG", ({ event, pick, dragging, lockCamera }) => {
|
|
@@ -1379,16 +1376,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1379
1376
|
added.forEach((plot) => update(plot));
|
|
1380
1377
|
removed.forEach((plot) => update(plot, true));
|
|
1381
1378
|
});
|
|
1382
|
-
useCesiumEventListener(
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1379
|
+
useCesiumEventListener(
|
|
1380
|
+
() => plots.value.map((plot) => plot.definitionChanged),
|
|
1381
|
+
(plot, key, newValue, oldValue) => {
|
|
1382
|
+
if (["disabled", "defining", "scheme", "sampled", "time"].includes(key)) {
|
|
1383
|
+
vue.nextTick(() => update(plot));
|
|
1384
|
+
} else if (key === "skeletons") {
|
|
1385
|
+
const { added, removed } = shared.arrayDiff(newValue, oldValue);
|
|
1386
|
+
added.forEach((item) => entityScope.add(item));
|
|
1387
|
+
removed.forEach((item) => entityScope.remove(item));
|
|
1388
|
+
}
|
|
1390
1389
|
}
|
|
1391
|
-
|
|
1390
|
+
);
|
|
1392
1391
|
vue.watch(current, (plot, previous) => {
|
|
1393
1392
|
plot && update(plot);
|
|
1394
1393
|
previous && update(previous);
|