未验证 提交 321e05de 编写于 作者: M Michael Herzog 提交者: GitHub

CSSRenderers: Prevent selection and dragging of CSS objects. (#22106)

上级 1ea2b28c
......@@ -13,6 +13,9 @@ class CSS2DObject extends Object3D {
this.element = element || document.createElement( 'div' );
this.element.style.position = 'absolute';
this.element.style.userSelect = 'none';
this.element.setAttribute( 'draggable', false );
this.addEventListener( 'removed', function () {
......
......@@ -16,6 +16,9 @@ class CSS3DObject extends Object3D {
this.element = element || document.createElement( 'div' );
this.element.style.position = 'absolute';
this.element.style.pointerEvents = 'auto';
this.element.style.userSelect = 'none';
this.element.setAttribute( 'draggable', false );
this.addEventListener( 'removed', function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册