Update IPathObject to include properties (#3822)

* Update IPathObject to include properties

* Fix ipathobject svgpath
This commit is contained in:
Sam El-Husseini
2020-04-15 19:46:11 -07:00
committed by GitHub
parent 12c8a50a0f
commit 0230a4c192
3 changed files with 34 additions and 2 deletions

View File

@@ -27,6 +27,38 @@ goog.requireType('Blockly.Theme');
*/
Blockly.blockRendering.IPathObject = function(_root, _constants) {};
/**
* The primary path of the block.
* @type {!SVGElement}
*/
Blockly.blockRendering.IPathObject.prototype.svgPath;
/**
* The renderer's constant provider.
* @type {!Blockly.blockRendering.ConstantProvider}
*/
Blockly.blockRendering.IPathObject.prototype.constants;
/**
* The primary path of the block.
* @type {!Blockly.Theme.BlockStyle}
*/
Blockly.blockRendering.IPathObject.prototype.style;
/**
* Holds the cursors svg element when the cursor is attached to the block.
* This is null if there is no cursor on the block.
* @type {SVGElement}
*/
Blockly.blockRendering.IPathObject.prototype.cursorSvg;
/**
* Holds the markers svg element when the marker is attached to the block.
* This is null if there is no marker on the block.
* @type {SVGElement}
*/
Blockly.blockRendering.IPathObject.prototype.markerSvg;
/**
* Set the path generated by the renderer onto the respective SVG element.
* @param {string} pathString The path.

View File

@@ -43,7 +43,7 @@ Blockly.blockRendering.PathObject = function(root, style, constants) {
/**
* The primary path of the block.
* @type {SVGElement}
* @type {!SVGElement}
* @package
*/
this.svgPath = Blockly.utils.dom.createSvgElement('path',

View File

@@ -54,7 +54,7 @@ Blockly.geras.PathObject = function(root, style, constants) {
/**
* The primary path of the block.
* @type {SVGElement}
* @type {!SVGElement}
* @package
*/
this.svgPath = Blockly.utils.dom.createSvgElement('path',