Skip to content

Commit b6b229e

Browse files
fix!: delete marker move event and tests (#9013)
1 parent 8edd373 commit b6b229e

6 files changed

Lines changed: 0 additions & 266 deletions

File tree

core/events/events.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export {CommentDelete} from './events_comment_delete.js';
3333
export {CommentDrag, CommentDragJson} from './events_comment_drag.js';
3434
export {CommentMove, CommentMoveJson} from './events_comment_move.js';
3535
export {CommentResize, CommentResizeJson} from './events_comment_resize.js';
36-
export {MarkerMove, MarkerMoveJson} from './events_marker_move.js';
3736
export {Selected, SelectedJson} from './events_selected.js';
3837
export {ThemeChange, ThemeChangeJson} from './events_theme_change.js';
3938
export {
@@ -77,7 +76,6 @@ export const CREATE = EventType.BLOCK_CREATE;
7776
/** @deprecated Use BLOCK_DELETE instead */
7877
export const DELETE = EventType.BLOCK_DELETE;
7978
export const FINISHED_LOADING = EventType.FINISHED_LOADING;
80-
export const MARKER_MOVE = EventType.MARKER_MOVE;
8179
/** @deprecated Use BLOCK_MOVE instead */
8280
export const MOVE = EventType.BLOCK_MOVE;
8381
export const SELECTED = EventType.SELECTED;

core/events/events_marker_move.ts

Lines changed: 0 additions & 133 deletions
This file was deleted.

core/events/predicates.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import type {CommentDelete} from './events_comment_delete.js';
2929
import type {CommentDrag} from './events_comment_drag.js';
3030
import type {CommentMove} from './events_comment_move.js';
3131
import type {CommentResize} from './events_comment_resize.js';
32-
import type {MarkerMove} from './events_marker_move.js';
3332
import type {Selected} from './events_selected.js';
3433
import type {ThemeChange} from './events_theme_change.js';
3534
import type {ToolboxItemSelect} from './events_toolbox_item_select.js';
@@ -99,11 +98,6 @@ export function isClick(event: Abstract): event is Click {
9998
return event.type === EventType.CLICK;
10099
}
101100

102-
/** @returns true iff event.type is EventType.MARKER_MOVE */
103-
export function isMarkerMove(event: Abstract): event is MarkerMove {
104-
return event.type === EventType.MARKER_MOVE;
105-
}
106-
107101
/** @returns true iff event.type is EventType.BUBBLE_OPEN */
108102
export function isBubbleOpen(event: Abstract): event is BubbleOpen {
109103
return event.type === EventType.BUBBLE_OPEN;

tests/mocha/event_marker_move_test.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/mocha/event_test.js

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import * as Blockly from '../../build/src/core/blockly.js';
88
import * as eventUtils from '../../build/src/core/events/utils.js';
9-
import {ASTNode} from '../../build/src/core/keyboard_nav/ast_node.js';
109
import {assert} from '../../node_modules/chai/chai.js';
1110
import {
1211
assertEventEquals,
@@ -519,85 +518,6 @@ suite('Events', function () {
519518
newValue: 'new value',
520519
}),
521520
},
522-
{
523-
title: 'null to Block Marker move',
524-
class: Blockly.Events.MarkerMove,
525-
getArgs: (thisObj) => [
526-
thisObj.block,
527-
true,
528-
null,
529-
new ASTNode(ASTNode.types.BLOCK, thisObj.block),
530-
],
531-
getExpectedJson: (thisObj) => ({
532-
type: 'marker_move',
533-
group: '',
534-
isCursor: true,
535-
blockId: thisObj.block.id,
536-
oldNode: undefined,
537-
newNode: new ASTNode(ASTNode.types.BLOCK, thisObj.block),
538-
}),
539-
},
540-
{
541-
title: 'null to Workspace Marker move',
542-
class: Blockly.Events.MarkerMove,
543-
getArgs: (thisObj) => [
544-
null,
545-
true,
546-
null,
547-
ASTNode.createWorkspaceNode(
548-
thisObj.workspace,
549-
new Blockly.utils.Coordinate(0, 0),
550-
),
551-
],
552-
getExpectedJson: (thisObj) => ({
553-
type: 'marker_move',
554-
group: '',
555-
isCursor: true,
556-
blockId: undefined,
557-
oldNode: undefined,
558-
newNode: ASTNode.createWorkspaceNode(
559-
thisObj.workspace,
560-
new Blockly.utils.Coordinate(0, 0),
561-
),
562-
}),
563-
},
564-
{
565-
title: 'Workspace to Block Marker move',
566-
class: Blockly.Events.MarkerMove,
567-
getArgs: (thisObj) => [
568-
thisObj.block,
569-
true,
570-
ASTNode.createWorkspaceNode(
571-
thisObj.workspace,
572-
new Blockly.utils.Coordinate(0, 0),
573-
),
574-
new ASTNode(ASTNode.types.BLOCK, thisObj.block),
575-
],
576-
getExpectedJson: (thisObj) => ({
577-
type: 'marker_move',
578-
group: '',
579-
isCursor: true,
580-
blockId: thisObj.block.id,
581-
oldNode: ASTNode.createWorkspaceNode(
582-
thisObj.workspace,
583-
new Blockly.utils.Coordinate(0, 0),
584-
),
585-
newNode: new ASTNode(ASTNode.types.BLOCK, thisObj.block),
586-
}),
587-
},
588-
{
589-
title: 'Block to Workspace Marker move',
590-
class: Blockly.Events.MarkerMove,
591-
getArgs: (thisObj) => [
592-
null,
593-
true,
594-
new ASTNode(ASTNode.types.BLOCK, thisObj.block),
595-
ASTNode.createWorkspaceNode(
596-
thisObj.workspace,
597-
new Blockly.utils.Coordinate(0, 0),
598-
),
599-
],
600-
},
601521
{
602522
title: 'Selected',
603523
class: Blockly.Events.Selected,

tests/mocha/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@
209209
import './event_comment_move_test.js';
210210
import './event_comment_drag_test.js';
211211
import './event_comment_resize_test.js';
212-
import './event_marker_move_test.js';
213212
import './event_selected_test.js';
214213
import './event_theme_change_test.js';
215214
import './event_toolbox_item_select_test.js';

0 commit comments

Comments
 (0)