Fix Warning
This commit is contained in:
parent
8c56cb347b
commit
f06f2c9b2a
|
@ -0,0 +1 @@
|
|||
[0113/225246.323:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types'
|
||||
import '../Qrcode.css';
|
||||
|
||||
const FrameworkParam = ({ paramName, children, ...other }) => (
|
||||
|
|
|
@ -9,7 +9,7 @@ const IconParams = ({ icon, onBlur, onKeyPress }) => {
|
|||
const { enabled, src, scale } = icon;
|
||||
const components = [];
|
||||
|
||||
if (getExactValue(enabled, 0) == 1) {
|
||||
if (getExactValue(enabled, 0) === 1) {
|
||||
components.push(
|
||||
<FrameworkParam paramName={"图标源"}>
|
||||
<ParamIconSrcViewer icon={icon} onChange={onBlur}/>
|
||||
|
@ -17,7 +17,7 @@ const IconParams = ({ icon, onBlur, onKeyPress }) => {
|
|||
);
|
||||
}
|
||||
|
||||
if (getExactValue(enabled, 0) != 0) {
|
||||
if (getExactValue(enabled, 0) !== 0) {
|
||||
components.push(
|
||||
<FrameworkParam paramName={"图标缩放"}>
|
||||
<input
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import React from "react";
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
const PresetModal({ visible, onClose, }) => {
|
||||
|
||||
}
|
|
@ -34,13 +34,13 @@ function listPoints({ qrcode, params, icon }) {
|
|||
if (qrcode.isDark(x, y) === false) continue;
|
||||
else if (typeTable[x][y] === QRPointType.POS_OTHER || typeTable[x][y] === QRPointType.POS_CENTER) {
|
||||
pointList.push(<rect width={size2} height={size2} key={id++} fill={upColor} x={x + (1 - size2)/2} y={y + (1 - size2)/2} transform={matrixString}/>);
|
||||
pointList.push(<rect width={height2} height={size2} key={id++} fill={leftColor} x={0} y={0} transform={matrixString+'translate('+String(x + (1 - size2)/2 + size2)+','+String(y + (1 - size2)/2)+') '+'skewY(45) '}/>);
|
||||
pointList.push(<rect width={size2} height={height2} key={id++} fill={rightColor} x={0} y={0} transform={matrixString+'translate('+String(x + (1 - size2)/2)+','+String(y + size2 + (1 - size2)/2)+') '+'skewX(45) '}/>);
|
||||
pointList.push(<rect width={height2} height={size2} key={id++} fill={leftColor} x={0} y={0} transform={`${matrixString} translate(${x + (1 - size2)/2 + size2}, ${y + (1 - size2)/2}) skewY(45)`}/>);
|
||||
pointList.push(<rect width={size2} height={height2} key={id++} fill={rightColor} x={0} y={0} transform={`${matrixString} translate(${x + (1 - size2)/2}, ${y + size2 + (1 - size2)/2}) skewX(45)`}/>);
|
||||
}
|
||||
else {
|
||||
pointList.push(<rect width={size} height={size} key={id++} fill={upColor} x={x + (1 - size)/2} y={y + (1 - size)/2} transform={matrixString}/>);
|
||||
pointList.push(<rect width={height} height={size} key={id++} fill={leftColor} x={0} y={0} transform={matrixString+'translate('+String(x + (1 - size)/2 + size)+','+String(y + (1 - size)/2)+') '+'skewY(45) '}/>);
|
||||
pointList.push(<rect width={size} height={height} key={id++} fill={rightColor} x={0} y={0} transform={matrixString+'translate('+String(x + (1 - size)/2)+','+String(y + size + (1 - size)/2)+') '+'skewX(45) '}/>);
|
||||
pointList.push(<rect width={height} height={size} key={id++} fill={leftColor} x={0} y={0} transform={`${matrixString} translate(${x + (1 - size)/2 + size}, ${y + (1 - size)/2}) skewY(45)`}/>);
|
||||
pointList.push(<rect width={size} height={height} key={id++} fill={rightColor} x={0} y={0} transform={`${matrixString} translate(${x + (1 - size)/2}, ${y + size + (1 - size)/2}) skewX(45)`}/>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -100,13 +100,14 @@ let defaultDrawIcon = function ({ qrcode, params, title, icon }) {
|
|||
const randomIdClips = getIdNum();
|
||||
pointList.push(
|
||||
<g transform={matrixString}>
|
||||
<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} />
|
||||
<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />
|
||||
</g>
|
||||
);
|
||||
pointList.push(
|
||||
<g key={id++} transform={matrixString}>
|
||||
<defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} /> </defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />
|
||||
</defs>
|
||||
<clipPath id={"clip-path" + randomIdClips}>
|
||||
<use xlinkHref={"#defs-path" + randomIdDefs} overflow="visible"/>
|
||||
</clipPath>
|
||||
|
@ -184,18 +185,19 @@ let builtinDrawIcon = function ({ qrcode, params, title, icon }) {
|
|||
const randomIdClips = getIdNum();
|
||||
pointList.push(
|
||||
<g transform={matrixString}>
|
||||
<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} />
|
||||
<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />
|
||||
</g>
|
||||
);
|
||||
pointList.push(
|
||||
<g key={id++} transform={matrixString}>
|
||||
<defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} /> </defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />
|
||||
</defs>
|
||||
<clipPath id={"clip-path" + randomIdClips}>
|
||||
<use xlinkHref={"#defs-path" + randomIdDefs} overflow="visible"/>
|
||||
</clipPath>
|
||||
<g clipPath={"url(#clip-path" + randomIdClips + ")"}>
|
||||
<g transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} >
|
||||
<g transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} >
|
||||
{builtinIcon()}
|
||||
</g>
|
||||
</g>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import {ParamTypes} from "../../constant/ParamTypes";
|
||||
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
|
||||
import {createRenderer, defaultDrawIcon} from "../style/Renderer";
|
||||
import {createRenderer} from "../style/Renderer";
|
||||
import {getExactValue, rand} from "../../utils/util";
|
||||
import LinkTrace from "../link/LinkTrace";
|
||||
|
||||
|
@ -14,7 +14,7 @@ function listPoints({ qrcode, params, icon }) {
|
|||
const {src, scale} = icon;
|
||||
|
||||
const iconSize = Number(nCount * (scale > .33 ? .33 : scale));
|
||||
const iconXY = (nCount - iconSize) / 2;
|
||||
// const iconXY = (nCount - iconSize) / 2;
|
||||
|
||||
function nearIcon(x, y) {
|
||||
return Math.pow((nCount - 1) / 2 - x, 2) + Math.pow((nCount - 1) / 2 - y, 2) < Math.pow(iconSize / 2, 2);
|
||||
|
@ -67,7 +67,7 @@ function listPoints({ qrcode, params, icon }) {
|
|||
}
|
||||
} else if (posType === 3) {
|
||||
pointList.push(<circle key={id++} fill={posColor} cx={x + 0.5} cy={y + 0.5} r={1.5} />)
|
||||
pointList.push(<path key={id++} d={sq25} stroke={posColor} strokeWidth={100/6 * (1 - (1 - size) * 0.75)} fill="none" transform={'translate('+String(x - 2.5)+','+String(y - 2.5)+') ' + 'scale(' + String(6/100) + ',' + String(6/100) + ')'} />)
|
||||
pointList.push(<path key={id++} d={sq25} stroke={posColor} strokeWidth={100/6 * (1 - (1 - size) * 0.75)} fill="none" transform={`translate(${x - 2.5}, ${y - 2.5}) scale(0.06, 0.06)`} />)
|
||||
}
|
||||
}
|
||||
else if (typeTable[x][y] === QRPointType.POS_OTHER) {
|
||||
|
|
|
@ -51,7 +51,7 @@ function listPoints({ qrcode, params, icon }) {
|
|||
}
|
||||
} else if (posType === 3) {
|
||||
pointList.push(<circle key={id++} fill={posColor} cx={x + 0.5} cy={y + 0.5} r={1.5} />)
|
||||
pointList.push(<path key={id++} d={sq25} stroke={posColor} strokeWidth={100/6 * (1 - (1 - 0.8) * 0.75)} fill="none" transform={'translate('+String(x - 2.5)+','+String(y - 2.5)+') ' + 'scale(' + String(6/100) + ',' + String(6/100) + ')'} />)
|
||||
pointList.push(<path key={id++} d={sq25} stroke={posColor} strokeWidth={100/6 * (1 - (1 - 0.8) * 0.75)} fill="none" transform={`translate(${x - 2.5}, ${y - 2.5}) scale(0.06, 0.06)`} />)
|
||||
}
|
||||
}
|
||||
else if (qrcode.isDark(x, y) && typeTable[x][y] === QRPointType.POS_OTHER) {
|
||||
|
@ -76,7 +76,7 @@ function listPoints({ qrcode, params, icon }) {
|
|||
if (funcType === 1) {
|
||||
let sizeF = 0
|
||||
let colorF = otherColor
|
||||
let fillF = colorF
|
||||
// let fillF = colorF
|
||||
let opacityF = Number(qrcode.isDark(x, y));
|
||||
if (dist > 5/20 && dist < 8/20) {
|
||||
sizeF = 5/10
|
||||
|
|
|
@ -58,7 +58,7 @@ function listPoints({ qrcode, params, icon }) {
|
|||
}
|
||||
} else if (posType === 3) {
|
||||
pointList.push(<circle key={id++} fill={posColor} cx={x + 0.5} cy={y + 0.5} r={1.5} />)
|
||||
pointList.push(<path key={id++} d={sq25} stroke={posColor} strokeWidth={100/6 * (1 - (1 - size) * 0.75)} fill="none" transform={'translate('+String(x - 2.5)+','+String(y - 2.5)+') ' + 'scale(' + String(6/100) + ',' + String(6/100) + ')'} />)
|
||||
pointList.push(<path key={id++} d={sq25} stroke={posColor} strokeWidth={100/6 * (1 - (1 - size) * 0.75)} fill="none" transform={`translate(${x - 2.5}, ${y - 2.5}) scale(0.06, 0.06)`}/>)
|
||||
}
|
||||
}
|
||||
else if (typeTable[x][y] === QRPointType.POS_OTHER) {
|
||||
|
|
|
@ -175,11 +175,13 @@ let defaultDrawIcon = function ({ qrcode, params, title, icon }) {
|
|||
if (icon && iconEnabled) {
|
||||
const randomIdDefs = getIdNum();
|
||||
const randomIdClips = getIdNum();
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 3} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} />);
|
||||
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 3} fill="#FFF" transform={`translate(${iconXY},${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />);
|
||||
pointList.push(
|
||||
<g key={id++}>
|
||||
<defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} /> </defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={`translate(${iconXY},${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />
|
||||
</defs>
|
||||
<clipPath id={"clip-path" + randomIdClips}>
|
||||
<use xlinkHref={"#defs-path" + randomIdDefs} overflow="visible"/>
|
||||
</clipPath>
|
||||
|
@ -255,16 +257,16 @@ let builtinDrawIcon = function ({ qrcode, params, title, icon }) {
|
|||
if (icon && iconMode) {
|
||||
const randomIdDefs = getIdNum();
|
||||
const randomIdClips = getIdNum();
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 3} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} />);
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 3} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />);
|
||||
pointList.push(
|
||||
<g key={id++}>
|
||||
<defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} /> </defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={`translate(${iconXY},${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} /></defs>
|
||||
<clipPath id={"clip-path" + randomIdClips}>
|
||||
<use xlinkHref={"#defs-path" + randomIdDefs} overflow="visible"/>
|
||||
</clipPath>
|
||||
<g clipPath={"url(#clip-path" + randomIdClips + ")"}>
|
||||
<g transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} >
|
||||
<g transform={`translate(${iconXY},${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} >
|
||||
{builtinIcon()}
|
||||
</g>
|
||||
</g>
|
||||
|
|
|
@ -35,11 +35,13 @@ let defaultDrawIcon = function ({ qrcode, params, title, icon }) {
|
|||
if (icon && iconEnabled) {
|
||||
const randomIdDefs = getIdNum();
|
||||
const randomIdClips = getIdNum();
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} />);
|
||||
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />);
|
||||
pointList.push(
|
||||
<g key={id++}>
|
||||
<defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} /> </defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />
|
||||
</defs>
|
||||
<clipPath id={"clip-path" + randomIdClips}>
|
||||
<use xlinkHref={"#defs-path" + randomIdDefs} overflow="visible"/>
|
||||
</clipPath>
|
||||
|
@ -115,16 +117,17 @@ let builtinDrawIcon = function ({ qrcode, params, title, icon }) {
|
|||
if (icon && iconMode) {
|
||||
const randomIdDefs = getIdNum();
|
||||
const randomIdClips = getIdNum();
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} />);
|
||||
pointList.push(<path d={sq25} stroke="#FFF" strokeWidth={100/iconSize * 1} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />);
|
||||
pointList.push(
|
||||
<g key={id++}>
|
||||
<defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} /> </defs>
|
||||
<path id={"defs-path" + randomIdDefs} d={sq25} fill="#FFF" transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} />
|
||||
</defs>
|
||||
<clipPath id={"clip-path" + randomIdClips}>
|
||||
<use xlinkHref={"#defs-path" + randomIdDefs} overflow="visible"/>
|
||||
</clipPath>
|
||||
<g clipPath={"url(#clip-path" + randomIdClips + ")"}>
|
||||
<g transform={'translate('+String(iconXY)+','+String(iconXY)+') ' + 'scale(' + String(iconSize/100) + ',' + String(iconSize/100) + ')'} >
|
||||
<g transform={`translate(${iconXY}, ${iconXY}) scale(${iconSize / 100}, ${iconSize / 100})`} >
|
||||
{builtinIcon()}
|
||||
</g>
|
||||
</g>
|
||||
|
|
Loading…
Reference in New Issue