mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Change below/above to after/before for 'paste' and 'mark spot' buttons.
This commit is contained in:
@@ -33,8 +33,8 @@ Blockly.Msg.CLEAR_WORKSPACE = 'Clear Workspace';
|
||||
Blockly.Msg.BLOCK_ACTION_LIST = 'block action list';
|
||||
Blockly.Msg.CUT_BLOCK = 'cut block';
|
||||
Blockly.Msg.COPY_BLOCK = 'copy block';
|
||||
Blockly.Msg.PASTE_BELOW = 'paste below';
|
||||
Blockly.Msg.PASTE_ABOVE = 'paste above';
|
||||
Blockly.Msg.PASTE_BEFORE = 'paste before';
|
||||
Blockly.Msg.PASTE_AFTER = 'paste after';
|
||||
Blockly.Msg.MARK_SPOT_BEFORE = 'mark spot before';
|
||||
Blockly.Msg.MARK_SPOT_AFTER = 'mark spot after';
|
||||
Blockly.Msg.MOVE_TO_MARKED_SPOT = 'move to marked spot';
|
||||
|
||||
@@ -239,12 +239,12 @@ blocklyApp.WorkspaceTreeComponent = ng.core
|
||||
this.notificationsService.setStatusMessage(
|
||||
this.getBlockDescription() + ' ' + Blockly.Msg.COPIED_BLOCK_MSG);
|
||||
},
|
||||
markSpotBelow_: function() {
|
||||
this.clipboardService.markConnection(this.block.nextConnection);
|
||||
},
|
||||
markSpotAbove_: function() {
|
||||
markSpotBefore_: function() {
|
||||
this.clipboardService.markConnection(this.block.previousConnection);
|
||||
},
|
||||
markSpotAfter_: function() {
|
||||
this.clipboardService.markConnection(this.block.nextConnection);
|
||||
},
|
||||
pasteToNextConnection_: function() {
|
||||
this.pasteToConnection_(this.block.nextConnection);
|
||||
},
|
||||
@@ -270,17 +270,8 @@ blocklyApp.WorkspaceTreeComponent = ng.core
|
||||
return false;
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'pasteBelow',
|
||||
translationIdForText: 'PASTE_BELOW',
|
||||
action: that.pasteToNextConnection_.bind(that),
|
||||
isDisabled: function() {
|
||||
return Boolean(
|
||||
!that.block.nextConnection ||
|
||||
!that.isCompatibleWithClipboard(that.block.nextConnection));
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'pasteAbove',
|
||||
translationIdForText: 'PASTE_ABOVE',
|
||||
baseIdKey: 'pasteBefore',
|
||||
translationIdForText: 'PASTE_BEFORE',
|
||||
action: that.pasteToPreviousConnection_.bind(that),
|
||||
isDisabled: function() {
|
||||
return Boolean(
|
||||
@@ -288,19 +279,28 @@ blocklyApp.WorkspaceTreeComponent = ng.core
|
||||
!that.isCompatibleWithClipboard(that.block.previousConnection));
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'markBelow',
|
||||
translationIdForText: 'MARK_SPOT_BEFORE',
|
||||
action: that.markSpotBelow_.bind(that),
|
||||
baseIdKey: 'pasteAfter',
|
||||
translationIdForText: 'PASTE_AFTER',
|
||||
action: that.pasteToNextConnection_.bind(that),
|
||||
isDisabled: function() {
|
||||
return !that.block.nextConnection;
|
||||
return Boolean(
|
||||
!that.block.nextConnection ||
|
||||
!that.isCompatibleWithClipboard(that.block.nextConnection));
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'markAbove',
|
||||
translationIdForText: 'MARK_SPOT_AFTER',
|
||||
action: that.markSpotAbove_.bind(that),
|
||||
baseIdKey: 'markBefore',
|
||||
translationIdForText: 'MARK_SPOT_BEFORE',
|
||||
action: that.markSpotBefore_.bind(that),
|
||||
isDisabled: function() {
|
||||
return !that.block.previousConnection;
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'markAfter',
|
||||
translationIdForText: 'MARK_SPOT_AFTER',
|
||||
action: that.markSpotAfter_.bind(that),
|
||||
isDisabled: function() {
|
||||
return !that.block.nextConnection;
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'moveToMarkedSpot',
|
||||
translationIdForText: 'MOVE_TO_MARKED_SPOT',
|
||||
|
||||
Reference in New Issue
Block a user