|
|
@@ -78,9 +78,10 @@ const onPointerUp = (event: PointerEvent) => {
|
|
|
|
|
|
const restColor = (i: number) => {
|
|
|
recorder.color(i)
|
|
|
- const w = canvas?.width
|
|
|
- const h = canvas?.height
|
|
|
- resetStyle.value = `width:${w}px;height:${h}px; cursor: url(/pen/${i}.cur) 0 17, crosshair;`
|
|
|
+ const w = canvas?.width || 0
|
|
|
+ const h = canvas?.height || 0
|
|
|
+ const r = window.devicePixelRatio
|
|
|
+ resetStyle.value = `width:${w / r}px;height:${h / r}px; cursor: url(/pen/${i}.cur) 0 17, crosshair;`
|
|
|
}
|
|
|
|
|
|
// socket init
|
|
|
@@ -143,6 +144,7 @@ onUnmounted(() => {
|
|
|
font-family: sans-serif;
|
|
|
margin: 0;
|
|
|
overflow: hidden;
|
|
|
+
|
|
|
#canvas {
|
|
|
display: block;
|
|
|
cursor: url('/pen/0.cur') 0 17, crosshair;
|