Commit a6c28229 authored by 范雪寒's avatar 范雪寒

feat: fit none

parent a466d631
...@@ -719,7 +719,7 @@ cc.Class({ ...@@ -719,7 +719,7 @@ cc.Class({
if (!canvasComponent.fitHeight && !canvasComponent.fitWidth) { if (!canvasComponent.fitHeight && !canvasComponent.fitWidth) {
console.log("fit none"); console.log("fit none");
const scale = Math.max( const scale = Math.min(
designSize.width / canvasSize.width, designSize.width / canvasSize.width,
designSize.height / canvasSize.height designSize.height / canvasSize.height
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment