mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
Standardize naming convention for marked-spot methods.
This commit is contained in:
@@ -62,7 +62,7 @@ blocklyApp.ToolboxTreeComponent = ng.core
|
||||
[attr.aria-level]="level + 2" aria-selected="false">
|
||||
<button #sendToSelectedButton
|
||||
[id]="idMap['sendToSelectedButton']"
|
||||
(click)="copyToMarked(block)"
|
||||
(click)="copyToMarkedSpot(block)"
|
||||
[disabled]="!canBeCopiedToMarkedConnection(block)">
|
||||
{{'COPY_TO_MARKED_SPOT'|translate}}
|
||||
</button>
|
||||
@@ -149,9 +149,9 @@ blocklyApp.ToolboxTreeComponent = ng.core
|
||||
this.clipboardService.copy(block, true);
|
||||
}
|
||||
},
|
||||
copyToMarked: function(block) {
|
||||
copyToMarkedSpot: function(block) {
|
||||
if (this.clipboardService) {
|
||||
this.clipboardService.pasteToMarkedConnection(block);
|
||||
this.clipboardService.pasteToMarkedConnection(block, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -159,7 +159,7 @@ blocklyApp.WorkspaceTreeComponent = ng.core
|
||||
}
|
||||
}, this.tree.id);
|
||||
},
|
||||
sendToMarkedSpot_: function() {
|
||||
moveToMarkedSpot_: function() {
|
||||
this.clipboardService.pasteToMarkedConnection(this.block, false);
|
||||
|
||||
var that = this;
|
||||
@@ -224,9 +224,9 @@ blocklyApp.WorkspaceTreeComponent = ng.core
|
||||
return !that.block.previousConnection;
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'sendToMarkedSpot',
|
||||
baseIdKey: 'moveToMarkedSpot',
|
||||
translationIdForText: 'MOVE_TO_MARKED_SPOT',
|
||||
action: that.sendToMarkedSpot_.bind(that),
|
||||
action: that.moveToMarkedSpot_.bind(that),
|
||||
isDisabled: function() {
|
||||
return !that.clipboardService.isMovableToMarkedConnection(
|
||||
that.block);
|
||||
|
||||
Reference in New Issue
Block a user