@react-three/fiber 8.7.2 → 8.7.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 8.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - eb5a3be4: fix: if there is an eventsource pointerevent will be set to none
8
+
3
9
  ## 8.7.2
4
10
 
5
11
  ### Patch Changes
@@ -218,7 +218,10 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
218
218
  }, []);
219
219
  React__namespace.useEffect(() => {
220
220
  if (canvas) return () => index.unmountComponentAtNode(canvas);
221
- }, [canvas]);
221
+ }, [canvas]); // When the event source is not this div, we need to set pointer-events to none
222
+ // Or else the canvas will block events from reaching the event source
223
+
224
+ const pointerEvents = eventSource ? 'none' : 'auto';
222
225
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
223
226
  ref: divRef,
224
227
  style: {
@@ -226,6 +229,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
226
229
  width: '100%',
227
230
  height: '100%',
228
231
  overflow: 'hidden',
232
+ pointerEvents,
229
233
  ...style
230
234
  }
231
235
  }, props), /*#__PURE__*/React__namespace.createElement("div", {
@@ -218,7 +218,10 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
218
218
  }, []);
219
219
  React__namespace.useEffect(() => {
220
220
  if (canvas) return () => index.unmountComponentAtNode(canvas);
221
- }, [canvas]);
221
+ }, [canvas]); // When the event source is not this div, we need to set pointer-events to none
222
+ // Or else the canvas will block events from reaching the event source
223
+
224
+ const pointerEvents = eventSource ? 'none' : 'auto';
222
225
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
223
226
  ref: divRef,
224
227
  style: {
@@ -226,6 +229,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
226
229
  width: '100%',
227
230
  height: '100%',
228
231
  overflow: 'hidden',
232
+ pointerEvents,
229
233
  ...style
230
234
  }
231
235
  }, props), /*#__PURE__*/React__namespace.createElement("div", {
@@ -191,7 +191,10 @@ const Canvas = /*#__PURE__*/React.forwardRef(function Canvas({
191
191
  }, []);
192
192
  React.useEffect(() => {
193
193
  if (canvas) return () => unmountComponentAtNode(canvas);
194
- }, [canvas]);
194
+ }, [canvas]); // When the event source is not this div, we need to set pointer-events to none
195
+ // Or else the canvas will block events from reaching the event source
196
+
197
+ const pointerEvents = eventSource ? 'none' : 'auto';
195
198
  return /*#__PURE__*/React.createElement("div", _extends({
196
199
  ref: divRef,
197
200
  style: {
@@ -199,6 +202,7 @@ const Canvas = /*#__PURE__*/React.forwardRef(function Canvas({
199
202
  width: '100%',
200
203
  height: '100%',
201
204
  overflow: 'hidden',
205
+ pointerEvents,
202
206
  ...style
203
207
  }
204
208
  }, props), /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "8.7.2",
3
+ "version": "8.7.3",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",