mirror of
https://github.com/google/blockly.git
synced 2025-12-16 14:20:10 +01:00
Rename workspace-tree to workspace-block.
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.WorkspaceTreeComponent = ng.core.Component({
|
||||
selector: 'blockly-workspace-tree',
|
||||
blocklyApp.WorkspaceBlockComponent = ng.core.Component({
|
||||
selector: 'blockly-workspace-block',
|
||||
template: `
|
||||
<li [id]="idMap['blockRoot']" role="treeitem" class="blocklyHasChildren"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['blockSummary'], 'blockly-translate-workspace-block')"
|
||||
@@ -44,10 +44,10 @@ blocklyApp.WorkspaceTreeComponent = ng.core.Component({
|
||||
</blockly-field-segment>
|
||||
</li>
|
||||
|
||||
<blockly-workspace-tree *ngIf="blockInput.connection && blockInput.connection.targetBlock()"
|
||||
[block]="blockInput.connection.targetBlock()" [level]="level + 1"
|
||||
[tree]="tree">
|
||||
</blockly-workspace-tree>
|
||||
<blockly-workspace-block *ngIf="blockInput.connection && blockInput.connection.targetBlock()"
|
||||
[block]="blockInput.connection.targetBlock()" [level]="level + 1"
|
||||
[tree]="tree">
|
||||
</blockly-workspace-block>
|
||||
<li #inputList [id]="idMap['inputList' + i]" role="treeitem"
|
||||
*ngIf="blockInput.connection && !blockInput.connection.targetBlock()"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['inputMenuLabel' + i], 'blockly-submenu-indicator')"
|
||||
@@ -65,13 +65,13 @@ blocklyApp.WorkspaceTreeComponent = ng.core.Component({
|
||||
</ol>
|
||||
</li>
|
||||
|
||||
<blockly-workspace-tree *ngIf= "block.nextConnection && block.nextConnection.targetBlock()"
|
||||
[block]="block.nextConnection.targetBlock()"
|
||||
[level]="level" [tree]="tree">
|
||||
</blockly-workspace-tree>
|
||||
<blockly-workspace-block *ngIf= "block.nextConnection && block.nextConnection.targetBlock()"
|
||||
[block]="block.nextConnection.targetBlock()"
|
||||
[level]="level" [tree]="tree">
|
||||
</blockly-workspace-block>
|
||||
`,
|
||||
directives: [blocklyApp.FieldSegmentComponent, ng.core.forwardRef(function() {
|
||||
return blocklyApp.WorkspaceTreeComponent;
|
||||
return blocklyApp.WorkspaceBlockComponent;
|
||||
})],
|
||||
inputs: ['block', 'level', 'tree', 'isTopLevel'],
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
@@ -37,8 +37,8 @@ blocklyApp.WorkspaceComponent = ng.core.Component({
|
||||
[attr.aria-labelledby]="workspaceTitle.id"
|
||||
(keydown)="onKeypress($event, tree)"
|
||||
(focus)="speakLocation(i)">
|
||||
<blockly-workspace-tree [level]="0" [block]="block" [tree]="tree" [isTopLevel]="true">
|
||||
</blockly-workspace-tree>
|
||||
<blockly-workspace-block [level]="0" [block]="block" [tree]="tree" [isTopLevel]="true">
|
||||
</blockly-workspace-block>
|
||||
</ol>
|
||||
|
||||
<span *ngIf="workspace.topBlocks_.length === 0">
|
||||
@@ -55,7 +55,7 @@ blocklyApp.WorkspaceComponent = ng.core.Component({
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
directives: [blocklyApp.WorkspaceTreeComponent],
|
||||
directives: [blocklyApp.WorkspaceBlockComponent],
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<script src="../../accessible/block-options-modal.component.js"></script>
|
||||
<script src="../../accessible/toolbox-modal.component.js"></script>
|
||||
<script src="../../accessible/sidebar.component.js"></script>
|
||||
<script src="../../accessible/workspace-tree.component.js"></script>
|
||||
<script src="../../accessible/workspace-block.component.js"></script>
|
||||
<script src="../../accessible/workspace.component.js"></script>
|
||||
<script src="../../accessible/app.component.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user