mirror of
https://github.com/google/blockly.git
synced 2026-01-15 12:57:12 +01:00
clang-format core/marker_manager.js
This commit is contained in:
@@ -27,7 +27,7 @@ const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
* @constructor
|
||||
* @package
|
||||
*/
|
||||
const MarkerManager = function(workspace){
|
||||
const MarkerManager = function(workspace) {
|
||||
/**
|
||||
* The cursor.
|
||||
* @type {?Cursor}
|
||||
@@ -73,8 +73,8 @@ MarkerManager.prototype.registerMarker = function(id, marker) {
|
||||
if (this.markers_[id]) {
|
||||
this.unregisterMarker(id);
|
||||
}
|
||||
marker.setDrawer(this.workspace_.getRenderer()
|
||||
.makeMarkerDrawer(this.workspace_, marker));
|
||||
marker.setDrawer(
|
||||
this.workspace_.getRenderer().makeMarkerDrawer(this.workspace_, marker));
|
||||
this.setMarkerSvg(marker.getDrawer().createDom());
|
||||
this.markers_[id] = marker;
|
||||
};
|
||||
@@ -89,7 +89,8 @@ MarkerManager.prototype.unregisterMarker = function(id) {
|
||||
marker.dispose();
|
||||
delete this.markers_[id];
|
||||
} else {
|
||||
throw Error('Marker with ID ' + id + ' does not exist. ' +
|
||||
throw Error(
|
||||
'Marker with ID ' + id + ' does not exist. ' +
|
||||
'Can only unregister markers that exist.');
|
||||
}
|
||||
};
|
||||
@@ -122,8 +123,8 @@ MarkerManager.prototype.setCursor = function(cursor) {
|
||||
}
|
||||
this.cursor_ = cursor;
|
||||
if (this.cursor_) {
|
||||
const drawer = this.workspace_.getRenderer()
|
||||
.makeMarkerDrawer(this.workspace_, this.cursor_);
|
||||
const drawer = this.workspace_.getRenderer().makeMarkerDrawer(
|
||||
this.workspace_, this.cursor_);
|
||||
this.cursor_.setDrawer(drawer);
|
||||
this.setCursorSvg(this.cursor_.getDrawer().createDom());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user