Skip to content

Commit adaf531

Browse files
committed
fix: rename mouseDownWrapper fields for Blockly v12 compatibility
1 parent 2d86986 commit adaf531

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/fields/field_matrix.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class FieldMatrix extends Blockly.Field<string> {
7070
* Touch event wrapper.
7171
* Runs when the field is selected.
7272
*/
73-
private mouseDownWrapper: Blockly.browserEvents.Data | null = null;
73+
private mouseDownWrapper_: Blockly.browserEvents.Data | null = null;
7474

7575
/**
7676
* Touch event wrapper.
@@ -558,8 +558,8 @@ class FieldMatrix extends Blockly.Field<string> {
558558
dispose() {
559559
super.dispose();
560560
this.matrixStage_ = null;
561-
if (this.mouseDownWrapper) {
562-
Blockly.browserEvents.unbind(this.mouseDownWrapper);
561+
if (this.mouseDownWrapper_) {
562+
Blockly.browserEvents.unbind(this.mouseDownWrapper_);
563563
}
564564
if (this.matrixTouchWrapper_) {
565565
Blockly.browserEvents.unbind(this.matrixTouchWrapper_);

src/fields/scratch_field_angle.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ScratchFieldAngle extends Blockly.FieldNumber {
5151
/**
5252
* Opaque identifier used to unbind event listener in dispose().
5353
*/
54-
private mouseDownWrapper: Blockly.browserEvents.Data;
54+
private mouseDownWrapper_: Blockly.browserEvents.Data;
5555

5656
/**
5757
* Opaque identifier used to unbind event listener in dispose().
@@ -142,8 +142,8 @@ class ScratchFieldAngle extends Blockly.FieldNumber {
142142
dispose() {
143143
super.dispose();
144144
this.gauge = null;
145-
if (this.mouseDownWrapper) {
146-
Blockly.browserEvents.unbind(this.mouseDownWrapper);
145+
if (this.mouseDownWrapper_) {
146+
Blockly.browserEvents.unbind(this.mouseDownWrapper_);
147147
}
148148
if (this.mouseUpWrapper) {
149149
Blockly.browserEvents.unbind(this.mouseUpWrapper);
@@ -286,7 +286,7 @@ class ScratchFieldAngle extends Blockly.FieldNumber {
286286
this.getSourceBlock() as Blockly.BlockSvg
287287
);
288288

289-
this.mouseDownWrapper = Blockly.browserEvents.bind(
289+
this.mouseDownWrapper_ = Blockly.browserEvents.bind(
290290
this.handle,
291291
"mousedown",
292292
this,

0 commit comments

Comments
 (0)