mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 utility service for multiple components. All
|
||||
* functions in this service should be stateless, since this is a singleton
|
||||
* service that is used for the entire application.
|
||||
* @fileoverview Angular2 utility service for multiple components. This is a
|
||||
* singleton service that is used for the entire application. In general, it
|
||||
* should only be used as a stateless adapter for native Blockly functions.
|
||||
*
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
@@ -30,19 +30,6 @@ blocklyApp.ID_FOR_EMPTY_WORKSPACE_BTN = 'blocklyEmptyWorkspaceBtn';
|
||||
|
||||
blocklyApp.UtilsService = ng.core.Class({
|
||||
constructor: [function() {}],
|
||||
generateUniqueId: function() {
|
||||
return 'blockly-' + Blockly.utils.genUid();
|
||||
},
|
||||
generateIds: function(elementsList) {
|
||||
var idMap = {};
|
||||
for (var i = 0; i < elementsList.length; i++){
|
||||
idMap[elementsList[i]] = this.generateUniqueId();
|
||||
}
|
||||
return idMap;
|
||||
},
|
||||
generateAriaLabelledByAttr: function(mainLabel, secondLabel) {
|
||||
return mainLabel + (secondLabel ? ' ' + secondLabel : '');
|
||||
},
|
||||
getBlockDescription: function(block) {
|
||||
// We use 'BLANK' instead of the default '?' so that the string is read
|
||||
// out. (By default, screen readers tend to ignore punctuation.)
|
||||
|
||||
Reference in New Issue
Block a user