提交 02ba4efa 编写于 作者: H hdx

canvas: 调整默认大小

上级 f80c80d2
<template>
<view>
<page-head :title="title"></page-head>
<view class="page-body">
<!-- #ifdef APP-PLUS || H5 -->
<canvas canvas-id="canvas" class="canvas" :start="startStatus" :change:start="animate.start"
......@@ -91,17 +92,8 @@
x = radius * cos + canvasWidth / 2,
y = radius * sin + canvasHeight / 2,
vx = speed * cos,
vy = speed * sin
ballList.push(new Ball({
x,
y,
vx,
vy,
canvasWidth,
canvasHeight,
ctx,
radius: 5
}))
vy = speed * sin;
ballList.push(new Ball({x, y, vx, vy, canvasWidth, canvasHeight, ctx, radius: 5}))
}
}
......@@ -247,13 +239,11 @@
</script>
<style>
.page-body-wrapper {
text-align: center;
}
.canvas {
width: 1024px;
min-height: 1024px;
width: 610rpx;
height: 610rpx;
background-color: #fff;
margin-left: auto;
margin-right: auto;
}
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册