blockly > Hộp công cụ > shouldDeselectItem_

Phương thức Toolbox.shouldDeselectItem_()

Quyết định xem có bỏ chọn mục cũ hay không.

Chữ ký:

protected shouldDeselectItem_(oldItem: ISelectableToolboxItem | null, newItem: ISelectableToolboxItem | null): boolean;

Các tham số

Thông số Loại Nội dung mô tả
oldItem ISelectableToolboxItem | giá trị rỗng Mục trong hộp công cụ đã chọn trước đó.
newItem ISelectableToolboxItem | giá trị rỗng Mục hộp công cụ mới được chọn.

Trả về:

boolean

"True" nếu bỏ chọn mục cũ, nếu không muốn đặt là "false".