Allow attribute-level disabling of click-drag functionality
This commit is contained in:
parent
9e49826865
commit
95f875e8ba
2 changed files with 6 additions and 1 deletions
|
@ -456,6 +456,11 @@ const {didMount, didUnmount} = (function getDidMountAndUnmount() {
|
|||
const {depth, offset, element} = selectItem(THREE, componentName, camera, clientX, clientY);
|
||||
|
||||
if (element) {
|
||||
// If click-drag is not enabled, return.
|
||||
if (element.getAttribute('click-drag').enabled === 'false') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Can only drag one item at a time, so no need to check if any
|
||||
// listener is already set up
|
||||
let removeDragItemListeners = dragItem(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue