bump version to 2.1.0

This commit is contained in:
Zeno Zeng 2022-02-04 10:42:43 +08:00
parent 35b9c08c5f
commit 5afaf230b7
2 changed files with 3 additions and 5 deletions

View File

@ -203,7 +203,7 @@ export default (function () {
stop.setAttribute("stop-color", format("rgb({r},{g},{b})", {r:matches[1], g:matches[2], b:matches[3]})); stop.setAttribute("stop-color", format("rgb({r},{g},{b})", {r:matches[1], g:matches[2], b:matches[3]}));
stop.setAttribute("stop-opacity", matches[4]); stop.setAttribute("stop-opacity", matches[4]);
} else { } else {
stop.setAttribute("stop-color", color); stop.setAttribute("stop-color", utils.toString(color));
} }
this.__root.appendChild(stop); this.__root.appendChild(stop);
}; };
@ -226,7 +226,7 @@ export default (function () {
var defaultOptions = { width:500, height:500, enableMirroring : false}, options; var defaultOptions = { width:500, height:500, enableMirroring : false}, options;
//keep support for this way of calling C2S: new C2S(width,height) // keep support for this way of calling Context: new Context(width, height)
if (arguments.length > 1) { if (arguments.length > 1) {
options = defaultOptions; options = defaultOptions;
options.width = arguments[0]; options.width = arguments[0];
@ -302,7 +302,6 @@ export default (function () {
console.debug(`svgcanvas#${this.__id}:`, ...data) console.debug(`svgcanvas#${this.__id}:`, ...data)
} }
/** /**
* Creates the specified svg element * Creates the specified svg element
* @private * @private
@ -763,7 +762,6 @@ export default (function () {
* Sets fill properties on the current element * Sets fill properties on the current element
*/ */
Context.prototype.fill = function () { Context.prototype.fill = function () {
utils.debug('fill', this.fillStyle);
if (this.__currentElement.nodeName === "path") { if (this.__currentElement.nodeName === "path") {
this.__currentElement.setAttribute("paint-order", "stroke fill markers"); this.__currentElement.setAttribute("paint-order", "stroke fill markers");
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "svgcanvas", "name": "svgcanvas",
"version": "2.0.7", "version": "2.1.0",
"description": "svgcanvas", "description": "svgcanvas",
"main": "dist/svgcanvas.js", "main": "dist/svgcanvas.js",
"scripts": { "scripts": {