mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
fix!: various drag-adjacent interfaces (#7975)
* fix: ISelectable and IDeletable interfaces * fix: switch everything over to use new draggable interface * fix: exports
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
import {BlockSvg} from './block_svg.js';
|
||||
import {DragTarget} from './drag_target.js';
|
||||
import type {IDeleteArea} from './interfaces/i_delete_area.js';
|
||||
import type {IDraggable} from './interfaces/i_draggable.old.js';
|
||||
import type {IDraggable} from './interfaces/i_draggable.js';
|
||||
import {isDeletable} from './interfaces/i_deletable.js';
|
||||
|
||||
/**
|
||||
* Abstract class for a component that can delete a block or bubble that is
|
||||
@@ -60,7 +61,7 @@ export class DeleteArea extends DragTarget implements IDeleteArea {
|
||||
const couldDeleteBlock = !block.getParent() && block.isDeletable();
|
||||
this.updateWouldDelete_(couldDeleteBlock);
|
||||
} else {
|
||||
this.updateWouldDelete_(element.isDeletable());
|
||||
this.updateWouldDelete_(isDeletable(element) && element.isDeletable());
|
||||
}
|
||||
return this.wouldDelete_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user