Standardize naming convention for marked-spot methods.

This commit is contained in:
Sean Lip
2016-07-19 18:43:27 -07:00
parent 0de625caf4
commit c24bfda7cf
2 changed files with 6 additions and 6 deletions

View File

@@ -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);
}
}
});

View File

@@ -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);