Skip to content

Commit

Permalink
fix: Use the normal, non-drag cursor when hovering over a bitmap fiel…
Browse files Browse the repository at this point in the history
…d. (#1810)
  • Loading branch information
gonfunko authored Jul 24, 2023
1 parent 0b8d5cd commit a4f8e8d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/field-bitmap/src/field-bitmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class FieldBitmap extends Blockly.Field {
super(value, validator, config);

this.SERIALIZABLE = true;
this.CURSOR = 'default';

// Configure value, height, and width
if (this.getValue() !== null) {
Expand Down Expand Up @@ -209,7 +210,13 @@ export class FieldBitmap extends Blockly.Field {
* @returns {boolean} True since it is always editable.
*/
updateEditable() {
return true;
const editable = super.updateEditable();
// Blockly.Field's implementation sets these classes as appropriate, but
// since this field has no text they just mess up the rendering of the
// grid lines.
Blockly.utils.dom.removeClass(this.fieldGroup_, 'blocklyNonEditableText');
Blockly.utils.dom.removeClass(this.fieldGroup_, 'blocklyEditableText');
return editable;
}

getScaledBBox() {
Expand Down

0 comments on commit a4f8e8d

Please sign in to comment.