mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
refactor: remove AnyDuringMigration from browser events (#6303)
* fix: bind data * fix: use correct event types * fix: make event happy with us clueging properties onto it * fix: change thisObject to type Object | null * chore: format * chore: call out event conversion wierdness * chore: fix build by changing things to use MouseEvent * chore: remove default value for object * fix: unbind trying to get an element of an empty array * chore: format * fix: call out potentially unsafe element access. * chore: add issue number to TODO * fix: attempt to fix CI build error?
This commit is contained in:
@@ -132,7 +132,7 @@ export abstract class Flyout extends DeleteArea implements IFlyout {
|
||||
/**
|
||||
* Opaque data that can be passed to Blockly.unbindEvent_.
|
||||
*/
|
||||
private eventWrappers_: AnyDuringMigration[][] = [];
|
||||
private eventWrappers_: browserEvents.Data = [];
|
||||
|
||||
/**
|
||||
* Function that will be registered as a change listener on the workspace
|
||||
@@ -904,7 +904,7 @@ export abstract class Flyout extends DeleteArea implements IFlyout {
|
||||
*/
|
||||
private blockMouseDown_(block: BlockSvg): Function {
|
||||
const flyout = this;
|
||||
return (e: Event) => {
|
||||
return (e: MouseEvent) => {
|
||||
const gesture = flyout.targetWorkspace.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.setStartBlock(block);
|
||||
@@ -917,7 +917,7 @@ export abstract class Flyout extends DeleteArea implements IFlyout {
|
||||
* Mouse down on the flyout background. Start a vertical scroll drag.
|
||||
* @param e Mouse down event.
|
||||
*/
|
||||
private onMouseDown_(e: Event) {
|
||||
private onMouseDown_(e: MouseEvent) {
|
||||
const gesture = this.targetWorkspace.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.handleFlyoutStart(e, this);
|
||||
|
||||
Reference in New Issue
Block a user