We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99c96dd commit d8a3b82Copy full SHA for d8a3b82
src/extras/gizmo/shape/shape.js
@@ -210,9 +210,8 @@ class Shape {
210
* @type {boolean}
211
*/
212
set disabled(value) {
213
- const color = value ? this._disabledColor : this._defaultColor;
214
- this._material.setParameter('uColor', color.toArray());
215
this._disabled = value ?? false;
+ this.hover(false);
216
}
217
218
/**
@@ -294,10 +293,8 @@ class Shape {
294
293
* @returns {void}
295
296
hover(state) {
297
- if (this._disabled) {
298
- return;
299
- }
300
- const color = state ? this._hoverColor : this._defaultColor;
+ const color = this._disabled ?
+ this._disabledColor : state ? this._hoverColor : this._defaultColor;
301
this._material.setParameter('uColor', color.toArray());
302
303
0 commit comments