@dcl/react-ecs 7.1.1 → 7.1.2-4408174335.commit-e673686

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.
@@ -24,6 +24,7 @@ export function createReconciler(engine, pointerEvents) {
24
24
  const UiInputResult = components.UiInputResult(engine);
25
25
  const UiDropdown = components.UiDropdown(engine);
26
26
  const UiDropdownResult = components.UiDropdownResult(engine);
27
+ const PointerEvents = components.PointerEvents(engine);
27
28
  // Component ID Helper
28
29
  const getComponentId = {
29
30
  uiTransform: UiTransform.componentId,
@@ -94,6 +95,7 @@ export function createReconciler(engine, pointerEvents) {
94
95
  function removeChildEntity(instance) {
95
96
  changeEvents.delete(instance.entity);
96
97
  engine.removeEntity(instance.entity);
98
+ pointerEventTick.delete(instance.entity);
97
99
  for (const child of instance._child) {
98
100
  removeChildEntity(child);
99
101
  }
@@ -233,12 +235,21 @@ export function createReconciler(engine, pointerEvents) {
233
235
  }
234
236
  }
235
237
  }
238
+ const pointerEventTick = new Set();
236
239
  return {
237
240
  update: function (component) {
238
241
  if (changeEvents.size) {
239
242
  handleOnChange(UiInput.componentId, UiInputResult);
240
243
  handleOnChange(UiDropdown.componentId, UiDropdownResult);
241
244
  }
245
+ for (const [entity] of engine.getEntitiesWith(UiTransform, PointerEvents)) {
246
+ if (pointerEventTick.has(entity)) {
247
+ continue;
248
+ }
249
+ pointerEventTick.add(entity);
250
+ // Re-send this pointer-event because of #issue
251
+ PointerEvents.getMutable(entity);
252
+ }
242
253
  return reconciler.updateContainer(component, root, null);
243
254
  },
244
255
  getEntities: () => Array.from(entities)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/react-ecs",
3
- "version": "7.1.1",
3
+ "version": "7.1.2-4408174335.commit-e673686",
4
4
  "description": "Decentraland ECS",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@types/react-reconciler": "^0.28.0"
29
29
  },
30
30
  "dependencies": {
31
- "@dcl/ecs": "7.1.1",
31
+ "@dcl/ecs": "7.1.2-4408174335.commit-e673686",
32
32
  "react": "^18.2.0",
33
33
  "react-reconciler": "^0.29.0"
34
34
  },
@@ -42,5 +42,5 @@
42
42
  "displayName": "React ECS",
43
43
  "tsconfig": "./tsconfig.json"
44
44
  },
45
- "commit": "d41e42b3708afee075cd36ec8ab5649b119f88ad"
45
+ "commit": "e6736863ba8ab33e7f45984a3543c5c8845d7d9f"
46
46
  }