mirror of
https://github.com/google/blockly.git
synced 2026-01-16 05:17:09 +01:00
Update IPathObject to include properties (#3822)
* Update IPathObject to include properties * Fix ipathobject svgpath
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user