Skip to content

Commit

Permalink
fix(troika-3d-ui): allow canceling drag-scroll behavior with e.preven…
Browse files Browse the repository at this point in the history
…tDefault()
  • Loading branch information
lojjic committed Apr 14, 2020
1 parent 97cd9ac commit eca5f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/troika-3d-ui/src/facade/UIBlock3DFacade.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function wheelHandler(e) {
}

function dragHandler(e) {
if (!e._didScroll) {
if (!e._didScroll && !e.defaultPrevented) {
const facade = e.currentTarget
const ray = e.ray.clone().applyMatrix4(tempMat4.getInverse(facade.threeObject.matrixWorld))
const localPos = ray.intersectPlane(tempPlane.setComponents(0, 0, 1, 0), new Vector3())
Expand Down

0 comments on commit eca5f15

Please sign in to comment.