@js-draw/math 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/Color4.js +3 -0
- package/dist/mjs/Color4.mjs +3 -0
- package/package.json +2 -2
- package/src/Color4.ts +4 -0
package/dist/cjs/Color4.js
CHANGED
@@ -85,6 +85,9 @@ class Color4 {
|
|
85
85
|
if (text === 'none' || text === 'transparent') {
|
86
86
|
return Color4.transparent;
|
87
87
|
}
|
88
|
+
if (text === '') {
|
89
|
+
return Color4.black;
|
90
|
+
}
|
88
91
|
// rgba?: Match both rgb and rgba strings.
|
89
92
|
// ([,0-9.]+): Match any string of only numeric, '.' and ',' characters.
|
90
93
|
const rgbRegex = /^rgba?\(([,0-9.]+)\)$/i;
|
package/dist/mjs/Color4.mjs
CHANGED
@@ -79,6 +79,9 @@ class Color4 {
|
|
79
79
|
if (text === 'none' || text === 'transparent') {
|
80
80
|
return Color4.transparent;
|
81
81
|
}
|
82
|
+
if (text === '') {
|
83
|
+
return Color4.black;
|
84
|
+
}
|
82
85
|
// rgba?: Match both rgb and rgba strings.
|
83
86
|
// ([,0-9.]+): Match any string of only numeric, '.' and ',' characters.
|
84
87
|
const rgbRegex = /^rgba?\(([,0-9.]+)\)$/i;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@js-draw/math",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.1",
|
4
4
|
"description": "A math library for js-draw. ",
|
5
5
|
"types": "./dist/mjs/lib.d.ts",
|
6
6
|
"main": "./dist/cjs/lib.js",
|
@@ -45,5 +45,5 @@
|
|
45
45
|
"svg",
|
46
46
|
"math"
|
47
47
|
],
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "0cb756d3150c8b33dd9a3217faa7d18229688f34"
|
49
49
|
}
|
package/src/Color4.ts
CHANGED
@@ -93,6 +93,10 @@ export default class Color4 {
|
|
93
93
|
return Color4.transparent;
|
94
94
|
}
|
95
95
|
|
96
|
+
if (text === '') {
|
97
|
+
return Color4.black;
|
98
|
+
}
|
99
|
+
|
96
100
|
// rgba?: Match both rgb and rgba strings.
|
97
101
|
// ([,0-9.]+): Match any string of only numeric, '.' and ',' characters.
|
98
102
|
const rgbRegex = /^rgba?\(([,0-9.]+)\)$/i;
|