We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eeb4f8a commit beb630dCopy full SHA for beb630d
painter.js
@@ -851,7 +851,7 @@ function setStringPrototype(screenK, scale) {
851
const formula = /^calc\((.+)\)$/.exec(this);
852
if (formula && formula[1]) {
853
// 进行 calc 计算
854
- const afterOne = formula[1].replace(/([^\s]+)\.(left|right|bottom|top|width|height)/g, word => {
+ const afterOne = formula[1].replace(/([^\s\(\+\-\*\/]+)\.(left|right|bottom|top|width|height)/g, word => {
855
const [id, attr] = word.split('.');
856
return penCache.viewRect[id][attr];
857
});
0 commit comments