反向scale 解决:1/scale 还原原来大小,在计算缩放后canvas宽高width*scale height*scale;
{
transform: `scale(${1/scale.x}, ${1/scale.y})`,
width: `${attr.w * scale.x}px`,
height: `${attr.h * scale.y}px`,
"transform-origin": "left top"
}
反向scale 解决:1/scale 还原原来大小,在计算缩放后canvas宽高width*scale height*scale;
{
transform: `scale(${1/scale.x}, ${1/scale.y})`,
width: `${attr.w * scale.x}px`,
height: `${attr.h * scale.y}px`,
"transform-origin": "left top"
}