Update geras and add underscore to setClass_

This commit is contained in:
Rachel Fenichel
2019-11-06 11:47:33 -08:00
parent e71366259c
commit bfff91b673
2 changed files with 9 additions and 8 deletions

View File

@@ -129,7 +129,7 @@ Blockly.blockRendering.PathObject.prototype.setStyle = function(blockStyle) {
* be removed.
* @protected
*/
Blockly.blockRendering.PathObject.prototype.setClass = function(
Blockly.blockRendering.PathObject.prototype.setClass_ = function(
className, add) {
if (add) {
Blockly.utils.dom.addClass(/** @type {!Element} */ (this.svgRoot),
@@ -165,7 +165,7 @@ Blockly.blockRendering.PathObject.prototype.updateHighlighted = function(
Blockly.blockRendering.PathObject.prototype.updateDisabled = function(disabled,
isShadow) {
this.setClass('blocklyDisabled', disabled);
this.setClass_('blocklyDisabled', disabled);
if (disabled) {
this.svgPath.setAttribute('fill',
'url(#' + this.constants_.disabledPatternId + ')');
@@ -180,7 +180,7 @@ Blockly.blockRendering.PathObject.prototype.updateDisabled = function(disabled,
* @package
*/
Blockly.blockRendering.PathObject.prototype.updateSelected = function(enable) {
this.setClass('blocklySelected', enable);
this.setClass_('blocklySelected', enable);
};
/**
@@ -191,7 +191,7 @@ Blockly.blockRendering.PathObject.prototype.updateSelected = function(enable) {
*/
Blockly.blockRendering.PathObject.prototype.updateDraggingDelete = function(
enable) {
this.setClass('blocklyDraggingDelete', enable);
this.setClass_('blocklyDraggingDelete', enable);
};
/**
@@ -202,7 +202,7 @@ Blockly.blockRendering.PathObject.prototype.updateDraggingDelete = function(
*/
Blockly.blockRendering.PathObject.prototype.updateInsertionMarker = function(
enable) {
this.setClass('blocklyInsertionMarker', enable);
this.setClass_('blocklyInsertionMarker', enable);
};
/**
@@ -211,5 +211,5 @@ Blockly.blockRendering.PathObject.prototype.updateInsertionMarker = function(
* @package
*/
Blockly.blockRendering.PathObject.prototype.updateMovable = function(enable) {
this.setClass('blocklyDraggable', enable);
this.setClass_('blocklyDraggable', enable);
};

View File

@@ -153,7 +153,7 @@ Blockly.geras.PathObject.prototype.setStyle = function(blockStyle) {
/**
* @override
*/
Blockly.geras.PathObject.prototype.setHighlighted = function(highlighted) {
Blockly.geras.PathObject.prototype.updateHighlighted = function(highlighted) {
if (highlighted) {
this.svgPath.setAttribute('filter',
'url(#' + this.constants_.embossFilterId + ')');
@@ -167,7 +167,8 @@ Blockly.geras.PathObject.prototype.setHighlighted = function(highlighted) {
/**
* @override
*/
Blockly.geras.PathObject.prototype.setDisabled = function(disabled, isShadow) {
Blockly.geras.PathObject.prototype.updateDisabled = function(
disabled, isShadow) {
if (disabled) {
this.svgPath.setAttribute('fill',
'url(#' + this.constants_.disabledPatternId + ')');