You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have different notches for different connection types in my project.
It can be managed in ConstantProvider.shapeFor() method. But sometimes is NOTCH path accessed directly and shape will not render correctly.
Describe the solution you'd like
Change all occurences of accessing NOTCH to calling ConstantProvider.shapeFor() method.
Additional context
Where to change it:
change row in Blockly.geras.Highlighter.prototype.drawTopCorner method in core/renderers/geras/highliter.js: this.steps_ += this.notchPaths_.pathLeft;
to: this.steps_ += row.constants_.shapeFor(row.connection.connectionModel).pathLeft;
change row in Blockly.RenderedConnection.prototype.highlight method in core/rendered_connection.js: renderingConstants.NOTCH.pathLeft +
to: renderingConstants.shapeFor(this).pathLeft +
in core/keyboard_nav/cursor_svg.js:
change row in Blockly.CursorSvg.prototype.showWithBlockPrevOutput_ method this.positionPrevious_(width, cursorOffset, cursorHeight);
to: this.positionPrevious_(width, cursorOffset, cursorHeight,block.previousConnection);
add parameter connection into Blockly.CursorSvg.prototype.positionPrevious_ method
and change row: this.constants_.NOTCH.pathLeft +
to: connection?this.constants_.shapeFor(connection).pathLeft:this.constants_.NOTCH.pathLeft +
After these code changes is custom notch rendered correctly.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have different notches for different connection types in my project.
It can be managed in ConstantProvider.shapeFor() method. But sometimes is NOTCH path accessed directly and shape will not render correctly.
Describe the solution you'd like
Change all occurences of accessing NOTCH to calling ConstantProvider.shapeFor() method.
Additional context
Where to change it:
change row in Blockly.geras.Highlighter.prototype.drawTopCorner method in core/renderers/geras/highliter.js:
this.steps_ += this.notchPaths_.pathLeft;
to:
this.steps_ += row.constants_.shapeFor(row.connection.connectionModel).pathLeft;
change row in Blockly.RenderedConnection.prototype.highlight method in core/rendered_connection.js:
renderingConstants.NOTCH.pathLeft +
to:
renderingConstants.shapeFor(this).pathLeft +
in core/keyboard_nav/cursor_svg.js:
change row in Blockly.CursorSvg.prototype.showWithBlockPrevOutput_ method
this.positionPrevious_(width, cursorOffset, cursorHeight);
to:
this.positionPrevious_(width, cursorOffset, cursorHeight,block.previousConnection);
add parameter connection into Blockly.CursorSvg.prototype.positionPrevious_ method
and change row:
this.constants_.NOTCH.pathLeft +
to:
connection?this.constants_.shapeFor(connection).pathLeft:this.constants_.NOTCH.pathLeft +
After these code changes is custom notch rendered correctly.
The text was updated successfully, but these errors were encountered: